JavaScript Reference/Javascript Properties/event — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:22, 26 мая 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