62 lines
1.3 KiB
PHP
62 lines
1.3 KiB
PHP
|
<html>
|
||
|
<head>
|
||
|
<script type="text/javascript" charset="utf-8" src="js/jquery-1.7.2.min.js"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<select name="sweets" id="select">
|
||
|
<option value="1" selected="selected">1</option>
|
||
|
<option value="2">2</option>
|
||
|
<option value="3">3</option>
|
||
|
<option value="4">4</option>
|
||
|
</select>
|
||
|
|
||
|
<select name="sweets" id="type">
|
||
|
<option value="cr" selected="selected">Kr</option>
|
||
|
<option value="ekr">Ekr</option>
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<br /><br /><br /><br /><br /><br />
|
||
|
|
||
|
<div>
|
||
|
Цена 1 - <span id="1">0</span><br />
|
||
|
Цена 2 - <span id="2">0</span><br />
|
||
|
Цена 3 - <span id="3">0</span><br />
|
||
|
</div>
|
||
|
<script>
|
||
|
var exp_cr_5 = [10500, 2, 4];
|
||
|
var exp_cr_10 = [100, 500];
|
||
|
var exp_cr_15 = [100, 500];
|
||
|
var exp_cr_20 = [100, 500];
|
||
|
|
||
|
for(var ind = 0; ind < 3; ind++) {
|
||
|
var s[ind] = check_sum(exp_cr_5[1], exp_cr_5[2]);
|
||
|
}
|
||
|
|
||
|
function process_rune(type, level) {
|
||
|
var s_1 = check_sum(exp_cr_5[1], exp_cr_5[2]);
|
||
|
$("#1").text(s_1+' = '+wins(exp_cr_5[0], s_1));
|
||
|
}
|
||
|
|
||
|
function check_sum(koef_1, koef_2) {
|
||
|
|
||
|
var summ_180 = 22*koef_1;
|
||
|
var summ_360 = 30*koef_2;
|
||
|
var summ_all = summ_180+summ_360;
|
||
|
return summ_all;
|
||
|
}
|
||
|
|
||
|
|
||
|
function wins(exp, level) {
|
||
|
var r = exp/level;
|
||
|
return r;
|
||
|
}
|
||
|
|
||
|
$("#select").change(function () {
|
||
|
process_rune(1, 1);
|
||
|
});
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
</html>
|