<input name=haha type="button" value="鼠标移上来" onmouseover="si=window.setInterval('test()',3000)" onmouseout="window.clearInterval(si)">
<script language=javascript>
function test()
{
alert("haha")
}
</script>

解决方案 »

  1.   

    把楼上写的setInterval改为setTimeout就可以
      

  2.   

    如果爱我就请<input type="button" onmouseover="run(this)" onclick="alert('我也爱你呀!')" value="点我:)"> 
     <script >
     
     function run(obj)
     {
    obj.style.position="absolute"; 
    obj.style.left = window.screen.availWidth /2 +   parseInt(200 * Math.random())-100  
    obj.style.top =window.screen.availHeight /2 + parseInt(200 * Math.random())-100 
    }
     
     </script>
      

  3.   

    同意hbhbhbhbhb1021(天外水火(我要多努力)) 我看到好多星星
      

  4.   

    那就在地图的元素上加onmouseover="tid=setInterval('button1.click();',3000);" onmouseout="clearInterval(tid);"