复制代码代码如下:
<! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // pt" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-bransitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html; charset = gb2312" />
<title> Timeout </title>
</head>
<corpo onload = "countSecond ()">
<input type = "text" id = "time" style = "borda: 0px;" size = "1px">
</body>
</html>
<Cript>
x = 0
Função CountSecond ()
{x = x+1
document.getElementById ("time"). value = x;
setTimeout ("countSecond ()", 1000)
}
</script>