JavaScript Reference/Javascript Properties/event
"event" Example
<html>
<body>
<script id="myScript" for="myButton" event="onclick()">
alert(myScript.event);
</script>
<button id="myButton">Event for This Script</button>
</body>
</html>
"event" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |<script> |
+----------------+--------------------------------------------------------------+
"event" Syntax and Note
Note:
Read and write property.
Specifies the name of the event that will trigger the script.
Syntax:
document.getElementById("scriptID").event = value
document.all.scriptID.event = value // IE only