当用户将鼠标悬停在链接上时,我需要延迟弹出此窗口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>
答案 0 :(得分:3)
<a href="#" onMouseOver="setTimeout(open_window,2000);" >Popup</a>