0
A
回答
3
function outfunction(event) {
var that = this; // to be able to use this later.
window.setTimeout(function() {
…
/* you can use 'that' here to refer to the element
event is also available in this scope */
}, 3000);
}
+0
您應該將事件對象傳遞給內部匿名函數。 – Triptych 2008-12-21 21:04:50
1
var doSomething = function() {
//Some code will here after 3 seconds of mouseout
};
anElement.onmouseout = function() {
setTimeout(doSomething, 3000);
};
什麼上面的代碼確實是onmouseout
3秒被調用
相關問題
- 1. 睡眠在JavaScript循環?
- 2. Javascript循環與睡眠
- 3. 與SetTimeout的JavaScript睡眠
- 4. 睡眠/等待/暫停javascript
- 5. Javascript的睡眠功能,而
- 6. PHP usleep /睡眠
- 7. 睡眠和睡眠開始錯誤
- 8. 睡眠()或睡眠()的準確程度
- 9. 如何禁用睡眠/睡眠功能?
- 10. 睡眠和睡眠有沒有區別?
- 11. PHP睡眠VS慶典睡眠
- 12. 睡在睡眠中的NSTimer
- 13. 打字稿睡眠
- 14. Azure WebJobs睡眠
- 15. Fortran睡眠
- 16. SHOW PROCESSLIST:睡眠
- 17. Web Worker睡眠
- 18. 睡眠呼籲
- 19. setVisibility睡眠
- 20. actionscript 3睡眠?
- 21. 蟒紋睡眠
- 22. NSThread的睡眠
- 23. iPhone和睡眠
- 24. InstanceOwnerException從睡眠
- 25. OSX bash「睡眠」
- 26. 睡眠()超時
- 27. 睡眠/鎖屏
- 28. 嘲笑「睡眠」
- 29. 刪除睡眠
- 30. Onmouseover OnMouseout javascript
我會用這個詞是延遲後執行
doSomething
功能。 – AnthonyWJones 2008-12-21 21:11:28