Copy code The code is as follows: "http://www.w3.org/TR/html4/loose.dtd"> Show dwell time < body> You have stayed at this site: <br>var second=0; <br>var minute= 0; <br>var hour=0; <br>window.setTimeout("interval();",1000); <br>function interval() <br>{ <br>second ; <br>if(second= =60) <br>{ <br>second=0;minute =1; <br>} <br>if(minute==60) <br>{ <br>minute=0;hour =1; <br> } <br>document.form1.textarea.value = hour "hour" minute "minute" second "second"; <br>window.setTimeout("interval();",1000); <br>} <br>< ;/script> <br></form> <br></body> <br></html> <br> </div>