fireEvent

fireEvent

 

IE私有函数,可以用来触发某些事件。

 

官方说明:http://msdn.microsoft.com/en-us/library/ms536423(v=vs.85).aspx

 

官方demo:http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/fireEventEX1.htm

 

简单介绍

 

有一个按钮有如下事件:

 

<button id="oButton" onclick="this.innerText='I have been clicked!'">Button</button>

 

下面一个div绑一个mouseover来触发一下按钮的事件:

 

 

<div id="oDiv" onmouseover="fnFireEvents();">Mouse over this! </div>

 

 

function fnFireEvents(){
    //调用fireEvent
    oButton.fireEvent("onclick");
}

 

你可能感兴趣的:(IE,only,fireevent)