<html>
<head>
     <title> 一个简单的计时器</title>
<style type=text/css>
<!--
a:link    {color:blue;text-decoration;none}
a:visited    {color:purple;text-decoration;none}
a:hover   {color:#cc0033;text-decoration;underline}
-->
</style>
<title> 一个简单的计时器</title>

<script language="javascript">
<!--
var the-count=0;
var the-timeout;

function doTimer()
//进行计时
{
   //计时显示
window.document.timer-form.the-text.value=the-count;
    //修改计时器
    the-count +=1;

the-timeout=setTimeout("doTimer();",1000);
}
-->
</script>
</head>
<body topmargin=1 leftmargin=2>

<h1 align=center>&nbsp;<font size=6 face=华文正楷>一个简单的计时器</font></h1>
<hr>
<div align=left>
<table border=0 width=630 cellspacing=0>
<tr><td width=513 valign=top align=left rowspan=2>
<small><small><br>
</small></small><font size=3>
<form name=timer-form>
<p align=center>
<input onclick=doTimer();type=button value=开始计时>
<input onclick=clearTimeout(the-timeout);type=buttom value=停止计时></p>
   <p align=center><br>
<input name=the-text value=0 size=20></form>
</font></td>
</tr>
</table>
</div>
</body>
</html>