标签:style blog http color java os io art
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript"> var mytimer = null; function beginEvent(){ //window.setTimeout("alert(‘Hello, world‘)", 1000); mytimer = window.setTimeout("myfunc(‘123‘,‘456‘)", 3000); } function cancelEvent() { clearTimeout(mytimer); mytimer = -1; } function myfunc(t1,t2) { alert(t1+" ,"+t2); if (mytimer == -1) return; var d = document.getElementById("div1"); d.innerText = new Date(); clearTimeout(mytimer); mytimer = null; } </script> </head> <body> <br/> <br/> <div id="div1" style="position: absolute; top: 100px; left: 100px; width: 100px; height: 100px; border: 1px solid black;" onmouseover="beginEvent()" onmouseout="cancelEvent()"></div> </body> </html>
鼠标悬停(鼠标悬停一段时间后触发事件)一段时间后触发事件,布布扣,bubuko.com
标签:style blog http color java os io art
原文地址:http://www.cnblogs.com/elves/p/3884928.html