object.setCapture() 当一个object的被 setCapture 后,他的方法将会被继承到整个文档进行捕获。
当不需要把方法继承到整个文档捕获时,要用 object.releaseCapture()
Mozilla 也有类似的功能,方法稍微不同
window.captureEvents(Event.eventType)
window.releaseEvents(Event.eventType)
Event 是Mozilla特殊的一个object.
eventType 包括: Abort, Blur, Click, Change, DblClick, DragDrop, Error, Focus, KeyDown, KeyPress, KeyUp, Load, MouseDown, MouseMove, MouseOut, MouseOver, MouseUp, Move, Reset, Resize, Select, Submit, Unload.
相关联接:
For IE
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/setcapture.asp
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/releasecapture.asp
For Mozilla
http://developer.mozilla.org/en/docs/DOM:window.captureEvents
http://developer.mozilla.org/en/docs/DOM:window.releaseEvents
本文转自 netcorner 博客园博客,原文链接: http://www.cnblogs.com/netcorner/archive/2007/12/05/2912247.html ,如需转载请自行联系原作者