贴微软自己的例子给你<SCRIPT>
function testMouse(oObject) {
if(!oObject.contains(event.fromElement)) {
alert("mouse arrived");
}
}
</SCRIPT>
<BUTTON ID=oButton onmouseover="testMouse(this)">Mouse Over This.</BUTTON>
<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>
function testMouse(oObject) {
if(!oObject.contains(event.fromElement)) {
alert("mouse arrived");
}
}
</SCRIPT>
<BUTTON ID=oButton onmouseover="testMouse(this)">Mouse Over This.</BUTTON>
<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>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货