Показать сообщение отдельно
  #9 (permalink)  
Старый 16.09.2015, 18:05
Профессор
Отправить личное сообщение для Sav2907 Посмотреть профиль Найти все сообщения от Sav2907
 
Регистрация: 15.09.2015
Сообщений: 180

Что-то не так
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Документ без названия</title>
</head>

<body>
01.<input id="hvl1" size="2"><input id="sht1" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs1" size="4" disabled/>&nbsp;11.<input id="hvl11" size="2"><input id="sht11" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs11" size="4" disabled/>&nbsp;21.<input id="hvl21" size="2"><input id="sht21" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs21" size="4" disabled/><br />
02.<input id="hvl2" size="2"><input id="sht2" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs2" size="4" disabled/>&nbsp;12.<input id="hvl12" size="2"><input id="sht12" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs12" size="4" disabled/>&nbsp;22.<input id="hvl22" size="2"><input id="sht22" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs22" size="4" disabled/><br />
03.<input id="hvl3" size="2"><input id="sht3" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs3" size="4" disabled/>&nbsp;13.<input id="hvl13" size="2"><input id="sht13" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs13" size="4" disabled/>&nbsp;23.<input id="hvl23" size="2"><input id="sht23" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs23" size="4" disabled/><br />
04.<input id="hvl4" size="2"><input id="sht4" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs4" size="4" disabled/>&nbsp;14.<input id="hvl14" size="2"><input id="sht14" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs14" size="4" disabled/>&nbsp;24.<input id="hvl24" size="2"><input id="sht24" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs24" size="4" disabled/><br />
05.<input id="hvl5" size="2"><input id="sht5" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs5" size="4" disabled/>&nbsp;15.<input id="hvl15" size="2"><input id="sht15" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs15" size="4" disabled/>&nbsp;25.<input id="hvl25" size="2"><input id="sht25" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs25" size="4" disabled/><br />
06.<input id="hvl6" size="2"><input id="sht6" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs6" size="4" disabled/>&nbsp;16.<input id="hvl16" size="2"><input id="sht16" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs16" size="4" disabled/>&nbsp;26.<input id="hvl26" size="2"><input id="sht26" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs26" size="4" disabled/><br />
07.<input id="hvl7" size="2"><input id="sht7" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs7" size="4" disabled/>&nbsp;17.<input id="hvl17" size="2"><input id="sht17" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs17" size="4" disabled/>&nbsp;27.<input id="hvl27" size="2"><input id="sht27" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs27" size="4" disabled/><br />
08.<input id="hvl8" size="2"><input id="sht8" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs8" size="4" disabled/>&nbsp;18.<input id="hvl18" size="2"><input id="sht18" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs18" size="4" disabled/>&nbsp;28.<input id="hvl28" size="2"><input id="sht28" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs28" size="4" disabled/><br />
09.<input id="hvl9" size="2"><input id="sht9" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs9" size="4" disabled/>&nbsp;19.<input id="hvl19" size="2"><input id="sht19" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs19" size="4" disabled/>&nbsp;29.<input id="hvl29" size="2"><input id="sht29" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs29" size="4" disabled/><br />
10.<input id="hvl10" size="2"><input id="sht10" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs10" size="4" disabled/>&nbsp;20.<input id="hvl20" size="2"><input id="sht20" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs20" size="4" disabled/>&nbsp;30.<input id="hvl30" size="2"><input id="sht30" size="2"/>&nbsp;&nbsp;&nbsp;<input id="chs30" size="4" disabled/><br /><br />

Общее время: <input id="chas" size="2" disabled/>&nbsp;Эффективность: <input id="efekt" size="2" disabled/> &nbsp;Премия: <input id="prem" size="2" disabled/>

</body>
<script>

	

var timerId = setInterval(function() {

  for(i=1;i<=30;i++){

    document.getElementById('chs'+i).value=parseFloat(document.getElementById('hvl'+i).value) * parseFloat(document.getElementById('chs'+i).value) / 100;

  }

} , 1000);

var sum = 0;

for(i=1;i<=30;i++){

  sum += parseFloat(document.getElementById('chs'+i).value);

}

chas.value = sum;


var timerId = setInterval(function() {
	efekt.value=Number(chas.value) / '480' * 100;
		
} , 1000);


</script>
</html>

Последний раз редактировалось Sav2907, 16.09.2015 в 18:12.
Ответить с цитированием