首先这三个不是函数,是属性
srcElement 产生事件的节点(DHTML对象)
当当前事件有移动成分时,如onmouseover、onmouseout等
fromElement、toElement
表示移动事件的两个端点
srcElement 产生事件的节点(DHTML对象)
当当前事件有移动成分时,如onmouseover、onmouseout等
fromElement、toElement
表示移动事件的两个端点
解决方案 »
- jqgrid获取不到json,写的没错啊
- 为什么无论按哪个如下的button,都会跳出i will be submit呢?谢谢。
- 这个为什么会出错啊 help me
- 不用循环如何获取FORM中input元素在elements集合中的索引值?
- 如何控制一个网页,使访问他的人不能刷新?
- 我想加载个100*100的图片格子但是运行非常慢
- 网页中的图框能不能随着文章的长短变化?而不会破坏图框?急求!
- 难题:怎样用window.open(...)来模拟showModaldialog的功能?即在不关闭用open打开的页下使用户单击页面无效。
- 如何用正则表达式判断时间?
- 获取所有table表格里的name=mobile的值怎么写啊
- <body onUnload="aa.php">的问题.
- 奇怪!!为什么RADIO的NAME属性改不了啊??
Scripting event.srcElement [ = oObject ] Possible ValuesoObject Object爐hat specifies the event that fired. 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 Dynamic Properties.ExampleThis example uses the srcElement property to retrieve the parent object, if needed, create the text range, move to the original object, and select the first word in the object.<SCRIPT LANGUAGE="JScript">
function selectWord() {
var oSource = window.event.srcElement ;
if (!oSource.isTextEdit)
oSource = window.event.srcElement.parentTextEdit;
if (oSource != null) {
var oTextRange = oSource.createTextRange();
oTextRange.moveToElementText(window.event.srcElement);
oTextRange.collapse();
oTextRange.expand("word");
oTextRange.select();
}
}
</SCRIPT>
Scripting event.fromElement [ = oObject ] Possible ValuesoObject Object that specifies or receives the previous location of the mouse pointer. 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 Dynamic Properties.ExampleIn this example, the alert returns "mouse arrived" when the mouse pointer moves over the button.<SCRIPT>
function testMouse(oObject) {
if(!oObject.contains(event.fromElement)) {
alert("mouse arrived");
}
}
</SCRIPT>
:
<BUTTON ID=oButton onmouseover="testMouse(this)">Mouse Over This.</BUTTON>
Scripting event.toElement [ = oObject ] Possible ValuesoObject Object爐hat specifies the object being moved to by the mouse. 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 Dynamic Properties.ExampleThis example uses the toElement property to display the tagName of the object to which the user moves the mouse pointer.<SCRIPT>
function fnGetTo(){
spanTo.innerHTML=window.event.toElement.tagName;
}</SCRIPT>
:
<SPAN onmouseout="fnGetTo()">
<P>Mouse Over This</P>
<P>toElement: <SPAN ID="spanTo"></SPAN></P>
</SPAN>