复制代码代码如下:
<! Doctype html public "-// w3c // dtd xhtml 1.0 transisi // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "konten-tipe" content = "text /html; charset = gb2312" />
<title> timeout </iteme>
</head>
<body onload = "countsecond ()">
<input type = "text" id = "time" style = "border: 0px;" size = "1px">
</body>
</html>
<script>
x = 0
fungsi countsecond ()
{x = x+1
document.geteLementById ("waktu"). value = x;
setTimeout ("countsecond ()", 1000)
}
</script>