Добавил:
student_tipo
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:лабораторные работы / Секундомер
.docx<html>
<head>
<title>Секундомер</title>
<script>
var milisec=0;
var seconds=0;
var show =true;
init=null;
function display()
{
if(milisec>=9)
{
milisec=0;
seconds+=1;
}
else
milisec+=1;
document.d.d2.value=seconds+":"+milisec;
init=setTimeout("display()",100);}
function startTIME()
{
if(init==null)
{
display();}}
function findTIME()
{
clearTimeout(init);
init=null;
}
</script>
<body>
<h2>Секундомер</h2>
<table border="0">
<tr>
<td align="center">
<form name="d">
<p><input type="text" size="8" name="d2"></p>
</form>
</td></tr>
<tr><td><input name = starter type=button value="start" onclick=startTIME();></td>
<tr><td><input name = finder type=button value="pause" onclick=findTIME();></td>
</tr>
</table>
</body>
</head>
</html>
Соседние файлы в папке лабораторные работы