<script type="text/javascript">
var ms = 0; var state = 0;
function start()
{
state = 1;
then = new Date();
then.setTime(then.getTime() - ms);
}
function stop()
{
state = 0;
now = new Date();
ms = now.getTime() - then.getTime();
document.stpw.time.value = ms;
}
function display()
{
setTimeout("display();",1);
if(state == 1)
{
now = new Date();
ms = now.getTime() - then.getTime();
var t = ms/1000;
document.getElementById("time").innerHTML=t;
document.getElementById("times").value=t;
}
}
</script>
<html>
<body>
<form action="111.php" method="GET">
<input type="submit"name="start"value="start">
<input type="submit"name="stop"value="stop">
<?
//....................
?>
</form>