最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

ondetach Event

Internet Development Index

Fires before a behavior is detached from an element.

Syntax

<PUBLIC:ATTACH
EVENT = ondetach
ONEVENT = sEventHandler
FOR = element
ID = sID
/>

Attributes

EVENT
Required. String that specifies the name of a Dynamic HTML (DHTML) event, or any of the events specific to the HTML Component (HTC) that are listed in the HTC Reference.
FOR
Optional. String that specifies one of the following values to identify the source of the event.
documentRefers to the document object.
elementDefault. Refers to the element to which the behavior is attached.
windowRefers to the window object.
ID
Optional. String that uniquely identifies the PUBLIC:ATTACH element within the component. This attribute is analogous to the ID attribute in DHTML.
ONEVENT
Required. String that specifies an inline script or a direct invocation of the event handler function.

Remarks

The ondetach event allows the behavior to perform some cleanup just before it completely detaches from the element.

In cases where a behavior attaches to events on the containing page using the attachEvent method, this event gives the behavior the opportunity to call the detachEvent method to stop receiving notifications from the page. A behavior that attaches to events on the page using the PUBLIC:ATTACH element automatically stops receiving notifications when the behavior detaches from the element, and does not need to call the detachEvent method when the ondetach event fires.

Example

This example uses the ondetach event to turn off the highlighting effect on a list of items initially attached to a highlighting behavior.

<PUBLIC:ATTACH EVENT="ondetach" ONEVENT="cleanup()" />
<SCRIPT LANGUAGE="JScript">
attachEvent ('onmouseover', Hilite);
attachEvent ('onmouseout', Restore);
function cleanup()
{
detachEvent ('onmouseover', Hilite);
detachEvent ('onmouseout', Restore);
}
function Hilite()
{
if (event.srcElement == element)
{
normalColor = style.color;
runtimeStyle.color  = "red";
runtimeStyle.cursor = "hand";
}
}
function Restore()
{
if (event.srcElement == element)
{
runtimeStyle.color  = normalColor;
runtimeStyle.cursor = "";
}
}
</SCRIPT>

See Also

detachEvent, attachEvent, Introduction to DHTML Behaviors, About Element Behaviors, Using HTML Components to Implement DHTML Behaviors in Script
蒲城县| 临沧市| 新乡市| 和龙市| 洪洞县| 兴国县| 左贡县| 绍兴市| 绥江县| 逊克县| 双牌县| 曲沃县| 清河县| 河曲县| 阿尔山市| 平江县| 民勤县| 泽普县| 友谊县| 监利县| 尖扎县| 北海市| 秭归县| 密山市| 岳普湖县| 海宁市| 南丰县| 武陟县| 五大连池市| 恭城| 涟水县| 临沭县| 行唐县| 太谷县| 思茅市| 海阳市| 澜沧| 恩施市| 五峰| 和田县| 三亚市|