Tip: You can modify some of the code before running
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; charset=gb2312 "/> <title> timer </title> </pead> <body> <script language=" JavaScript "> var se,m=0,h=0,s=0,ss=1,istrue=true; function second () {if (ss%100) ==0) {S+=1;ss=1} if (s>0 && (s%60) ==0) {m+=1;s=0;} if (M>0 && (m%60) = =0) {h+=1;m=0} var sstext = SS < 10? "0" +SS:SS; t=h+ "+m+" +s+ "seconds" +sstext+ "milliseconds"; document.getElementById ("Showtime"). Innerhtml=t; Ss+=1; function Startclock () {if (se==null| | se== ' Undefined ' | | IsTrue) Se=setinterval ("second ()", 1); istrue=false;} function Pauseclock () {clearinterval (SE); istrue=true} function Stopclock () {clearinterval (SE); ss=1;m=h=s=0; document.getElementById ("Showtime"). Innerhtml= "0:0 0 seconds 00 milliseconds"; istrue=true; </script> <table align= "center" > <tr> <TD align= "center" > <p id= "Showtime" >0 0 minutes 0 seconds 00 milliseconds </p><br/> <input name= "s" Ali gn= "Center" type= "button" value= "Start timing" onclick= "Startclock ()" > <input name= "s" align= "center" type= "Butto N "value=" Pause Timer "onclick=" Pauseclock () "> <input name=" s "align=" center "type=" button "value=" Re-timer "onclick = "Stopclock ()" > </td> </tr> </table> </body> </ptml></td> </tr> </t Able>
Tip: You can modify some of the code before running