คัดลอกรหัสรหัสดังนี้:
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html; charset = utf-8" /> />
<title> เอกสารที่ไม่ใช่ title </title>
<ภาษาสคริปต์ = "JavaScript">
var t = null;
t = settimeout (เวลา, 1,000);
เวลาฟังก์ชัน ()
-
ClearTimeout (t);
dt = วันที่ใหม่ ();
var h = dt.gethouse ();
varm = dt.getMinutes ();
var s = dt.getSeconds ();
document.getElementById ("timeshow")
t = settimeout (เวลา, 1,000); // ตั้งค่าตัวจับเวลาและหมุนเวียน
-
</script>
</head>
<body>
<label id = "timeshow"> </ล่าสุด
</body>
</html>