复制代码代码如下:
<! Doctype html public "- // w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<adal>
<meta http-equiv = "contenu-type" contenu = "text / html; charset = utf-8" />
<Title> 无标题文档 </TITAL>
<script type = "text / javascript">
// 页面上动态时间
Fonction Time () {
var dt;
var date = new Date ();
dt = date.getlyar ()
+ "/"
+ date.getMonth ()
+ "/"
+ date.getDate ()
+ ""
+ (date.Gethours () <= 9? '0' + date.Gethours (): date
.Gethours ())
+ ":"
+ ((date.getMinutes () <= 9? '0' + date.getMinutes (): date
.getMinutes ()))
+ ":"
+ (date.getSeconds () <= 9? '0' + date.getSeconds (): date
.getSeconds ());
//Document.getElementByid("ht").innerhtml=dt;
retour dt;
}
setInterval ("document.getElementById ('ht'). innerHtml = time ()", 1000);
</cript>
</ head>
<body>
<span id = "ht"> </span>
</docy>
</html>