-----031-Window-Interval.html-----
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="content-type" content="text/html; charset=utf-8"> 5 <title>标题</title> 6 </head> 7 <body> 8 <form name="frm"> 9 <input name="txt" border="0" size="0"/> 10 <input type="button" value="停止" onclick="clearInterval(itv)"/> 11 <input type="button" value="关闭" onclick="window.close()"/> 12 </form> 13 <script type="text/javascript"> 14 function setSize() 15 { 16 document.frm.txt.size++; 17 } 18 itv = setInterval(setSize, 200); 19 </script> 20 </body> 21 </html>