延迟Javascript Window.open函数2秒

时间:2010-12-24 05:05:03

标签: javascript

当用户将鼠标悬停在链接上时,我需要延迟弹出此窗口2秒钟。

function open_window() 
{
new_window = open("http://www.mysite.com","site","width=610,height=510,left=600,top=400");
}


<a href="#" onMouseOver="javascript:open_window();" >Popup</a>

1 个答案:

答案 0 :(得分:3)

<a href="#" onMouseOver="setTimeout(open_window,2000);" >Popup</a>