标签:
http://boleyn.iteye.com/blog/1144015
<html> <head> <title> timer_test </title> <meta charset="utf-8"> <script type="text/javascript"> function timeout() { function conf1() { if (confirm("要取消吗")==true) { clearInterval(t); } else { console.log("have not cancel!"); } } // var t=setInterval("conf1()",2000); // 出错咯 var t=setInterval(conf1,2000); } </script> </head> <body> <input type="button" value="click me " onclick="timeout()"> </body> </html>
标签:
原文地址:http://www.cnblogs.com/Tachi/p/5585849.html