Сообщение от рони
|
PHP Useless,
k1 откуда берёте?
|
Вот скрипт одного блока
<script type="text/javascript" >
function getNum1(d1_1, y1_1,d2_1, y2_1,d3_1, y3_1,d4_1, y4_1,d5_1, y5_1)
{
var k1 = 1;
var k2 = 2;
var k3 = 2;
var k4 = 1;
var k5 = 1;
// alert(val);
// if(d1_1>25){d1_1=25}
var nb1= ((4*d1_1)-y1_1)*k1;
var nb2= ((4*d2_1)-y2_1)*k2;
var nb3= ((4*d3_1)-y3_1)*k3;
var nb4= ((4*d4_1)-y4_1)*k4;
var nb5= ((4*d5_1)-y5_1)*k5;
var nb= (nb1+nb2+nb3+nb4+nb5);
var numb = document.getElementById('result1');
var numb1 = document.getElementById('result1_1');
var numb2 = document.getElementById('result1_2');
var numb3 = document.getElementById('result1_3');
var numb4 = document.getElementById('result1_4');
var numb5 = document.getElementById('result1_5');
if(navigator.appName == "Microsoft Internet Explorer")
{ numb.innerText = nb;
numb1.innerText = nb1;
numb2.innerText = nb2;
numb3.innerText = nb3;
numb4.innerText = nb4;
numb5.innerText = nb5;
}
else
{ var numb = document.getElementById('result1');
numb.textContent = nb;
numb1.textContent = nb1;
numb2.textContent = nb2;
numb3.textContent = nb3;
numb4.textContent = nb4;
numb5.textContent = nb5;
}
}