<img onclick="这里直接写文本框双击时运行的函数">
另附参考模板
<HTML>
<HEAD>
<SCRIPT>
function fnFireEvents()
{
oDiv.innerText = "The cursor has moved over me!";
oButton.fireEvent("onclick");
}
</SCRIPT>
</HEAD>
<BODY>
<h1>Using the fireEvent method</h1>
By moving the cursor over the DIV below, the button is clicked.
<P>
<DIV ID="oDiv" onmouseover="fnFireEvents();">
Mouse over this!
</DIV>
<p>
<BUTTON ID="oButton" ONCLICK="this.innerText='I have been clicked!'" >
Button</BUTTON>
</BODY>
</HTML>
本文介绍了一种在HTML中利用fireEvent方法触发元素事件的技术。通过一个具体示例展示了如何当鼠标移过一个DIV元素时,触发按钮的点击事件,并更新其文本内容。
562

被折叠的 条评论
为什么被折叠?



