<div class="codetitle"> <span><a style="CURSOR: pointer" data="74241" class="copybut" id="copybut74241" onclick="doCopy('code74241')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code74241"> <br><div id="testDiv">放在我上面</div> <br><script type="text/javascript"> <BR>$('#testDiv').mousemove(function(e) { <BR>var xx = e.originalEvent.x || e.originalEvent.layerX || 0; <BR>var yy = e.originalEvent.y || e.originalEvent.layerY || 0; <BR>$(this).text(xx + '---' + yy); <BR>}); <BR></script> <br> </div> <br><strong>javascript获取鼠标当前位置坐标</strong> <br>鼠标滑动显示鼠标的当前位置坐标,主要是onmousemove函数。 <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="65955" class="copybut" id="copybut65955" onclick="doCopy('code65955')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code65955"> <br> <br> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <br><title>javascript</title> </div>