日期:2014-05-17 浏览次数:20985 次
Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: <div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script> 我用了你这人个,可以用,但我想鼠标能点到悬浮窗里面的东西啊,这要怎么改。 你看下那几个事件啊,把onmouseout="showDiv(0)"
Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: <div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script> 我用了你这人个,可以用,但我想鼠标能点到悬浮窗里面的东西啊,这要怎么改。 你看下那几个事件啊,把onmouseout="showDiv(0)"
Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: <div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script> 我用了你这人个,可以用,但我想鼠标能点到悬浮窗里面的东西啊,这要怎么改。 你看下那几个事件啊,把onmouseout="showDiv(0)"
Quote: 引用: Quote: 引用: Quote: 引用: Quote: 引用: <div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script> 我用了你这人个,可以用,但我想鼠标能点到悬浮窗里面的东西啊,这要怎么改。 你看下那几个事件啊,把onmouseout="showDiv(0)"
Quote: 引用: Quote: 引用: Quote: 引用: <div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script> 我用了你这人个,可以用,但我想鼠标能点到悬浮窗里面的东西啊,这要怎么改。 你看下那几个事件啊,把onmouseout="showDiv(0)"
Quote: 引用: Quote: 引用: <div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script> 我用了你这人个,可以用,但我想鼠标能点到悬浮窗里面的东西啊,这要怎么改。 你看下那几个事件啊,把onmouseout="showDiv(0)"
Quote: 引用: <div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script> 我用了你这人个,可以用,但我想鼠标能点到悬浮窗里面的东西啊,这要怎么改。
<div id="view" onmouseover="showDiv(1)" onmouseout="showDiv(0)" onmousemove="mouseMove(event)">查看</div> <div id="area" style="display:none;">这里的数据用ajax去请求过来</div> <script language="javascript" type="text/javascript"> function showDiv(open) { document.getElementById("area").style.display=open?"":"none"; } function mouseMove(e) { var o = document.getElementById("area"); o.style.left = mousePos(e).x-170; o.style.top = mousePos(e).y; } function mousePos(e) { var x,y; var e = e------解决方案--------------------window.event; return { x:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft, y:e.clientY+document.body.scrollTop+document.documentElement.scrollTop }; }; </script>