Ajax
ASP
C,C++
C#,.NET
CSS,HTML
Delphi,Kylix
Experience
Flash
Java
JavaScript
PHP
Python
QT
SQL
ShellScript
VB
U :
P :
Register
Lost Password
Other Links
Code Archive
Save Giovanni
JavaScript Category Code
Real Name
:
SharingCode.NET User
Subject
:
Document and Layer Event Capture and Release
Description
:
Document and Layer Event Capture and Release
/* JavaScript Bible, Fourth Edition by Danny Goodman John Wiley & Sons CopyRight 2001 */ <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function setDocCapture(enable) { if (!enable) { document.captureEvents(Event.CLICK) } else { document.releaseEvents(Event.CLICK) } } function setLayerCapture(enable) { if (!enable) { document.layer1.captureEvents(Event.CLICK) } else { document.layer1.releaseEvents(Event.CLICK) } } function doMainClick(e) { if (e.target.type == "button") { alert("Captured in top document") } } document.captureEvents(Event.CLICK) document.onclick=doMainClick </SCRIPT> </HEAD> <BODY>
Rating
:
4.50
(out of 5)
Visitor Voting Booth
:
Excellent
Very Good
Good
Fair
Poor
Copyright © 2006 SharingCode.NET . All rights reserved. Hosted By: SisNetworks