attachEvent
adds any user-defined handler to available events
number attachEvent(string name,function handler);
name | string | name of the event |
handler | function | user-defined event handler |
number | internal event id, you can use it for detachEvent(id) |
Example
// attach event
var evId = myWins.attachEvent("eventName", function(){
// your code here
});
// detach event
myWins.detachEvent(evId);
Details
- several handlers can be attached to one and the same event, and all of them will be executed
- event names are case-insensitive
Back to top