function fnFireEvents()
{
document.getElementById(”oDiv”).innerHTML = “The cursor has moved over me!”;
document.getElementById(”oButton”).fireEvent(”onclick”);
}
By moving the cursor over the DIV below, the button is clicked.
Mouse over this!
Button
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
参考资料:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/fireevent.asp
http://www.webreference.com/js/column23/fire.html