特效时钟
作者:互联网
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>特效时钟</title> </head> <body> <div id="myblock"></div> <script type="text/javascript"> function mytime(){ var time=new Date(); var hh=time.getHours(); var mm=time.getMinutes(); var ss=time.getSeconds(); document.getElementById("myblock").innerHTML="现在是"+hh+":"+mm+":"+ss; } var my=setInterval("mytime()",1000) </script> <input type="button" value="取消" onclick="javascript:clearInterval(my)"> </body> </html>
标签:特效,mm,mytime,ss,hh,time,var,时钟 来源: https://www.cnblogs.com/gnos/p/13092833.html