HBCMS更多的中文手册参考:

EVENT Attribute | event参数属性

DHTML文档教程

Sets or retrieves the event for which the script is written.

dhtml语法

HTML<SCRIPT EVENT = sEvent... >
ScriptingSCRIPT.event [ = sEvent ]

DHTML可能的值

sEventString that specifies or receives the event. The value for an onmouseover event, for example, is "onmouseover()".

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

DHTML代码范例

This example uses the EVENT attribute and the event property to handle the onclick event.

<script id=obuttonscript for="obutton" event="onclick()">
var sMessage1 = "Flip"
var sMessage2 = "Flop"
if (oButton.innerText == sMessage1) {
oButton.innerText = sMessage2;
}
else {
if (oButton.innerText == sMessage2) {
oButton.innerText = sMessage1;
}
</SCRIPT>
</HEAD>
<BODY>
:
<BUTTON ID="oButton" onmouseout="alert(oButtonScript.event)">Flip</BUTTON>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 2 Non-Microsoft link.

Applies To

SCRIPT

更多语法参考

event