JavaScript Reference/Javascript Properties/event
Версия от 18:30, 25 мая 2010; (обсуждение)
"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