This article is mainly for the realization of a pure JS dynamic time display code is introduced, the need for friends can come to the reference, I hope to help you.
The code is as follows: <html xmlns= "http://www.w3.org/1999/xhtml" > <head> <meta http-equiv= "Content-type" text/html; Charset=utf-8 "/> <title> Untitled document </title> <script language=" JavaScript "> var t = null; T = settimeout (time,1000);//Start function time () { &NBSP;CL Eartimeout (t)/purge timer &NBSP;DT = new Date (); var h=dt.gethours (); var m=dt.getminutes (); var s=dt.getseconds (); document.getelementbyid ("Timeshow"). InnerHTML = "The time is now:" +h+ "+m+" "+s+" seconds "; t = settimeout (time,1000); Set timer, loop execution } </script> </head> &N Bsp <body> <label id= "timeshow" ></lable> </body> </html>