<body onmousemove="move();">
</body><script>
function move(){
document.body.innerHTML=document.body.innerHTML+"<br>x:"+window.event.x+"y:"+window.event.y;
}
</script>
</body><script>
function move(){
document.body.innerHTML=document.body.innerHTML+"<br>x:"+window.event.x+"y:"+window.event.y;
}
</script>
解决方案 »
- PAZU使用JS直接打印功能
- 有用过selection.createRange().pasteHTML()的高手吗?怎样让它原样显示,不加http。多谢了。
- jquery 选择器问题。。。
- 高手帮帮把这段远程保存代码变成javascript
- 请问事件驱动后面什么时候不用onload=javascript这样生命
- 求JavaScript正则表达式
- image
- 用JS来实现ifram的src值的变化,每次经过刷新,ifram中src的值不同
- 如何实现两个select列表(可多选) 进行选择的数据交换。。。
- 飞机大战中this.imagenode = null是什么意思
- javascript缓缓展开层的写法
- 把iframe嵌入.js文件中,代码该如何写?只有60分了,准备加!
<script language="javascript">
var where = "";
var str = "";
var x=y="";
function checkwhere(e) {
if (document.layers){
xCoord = e.x;
yCoord = e.y;
}
else if (document.all){
xCoord = event.clientX;
yCoord = event.clientY;
}
else if (document.getElementById){
xCoord = e.clientX;
yCoord = e.clientY;
}
if(x==xCoord&&y==yCoord)return;//如果和上次坐标相同的未移动不记录
x=xCoord;
y=yCoord;
str += "X座标值= "+ xCoord + " Y座标值= " + yCoord ;
document.title = str
status=str;
site.innerHTML=str;
}
document.onmousemove = checkwhere; if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
</script>
<body onmousemove=checkwhere>
<div id=site></div>
</body>
var where = "";
var str = "";
var xCoord,yCoord
var first=true;
function getxy(){
if (document.layers){
xCoord = e.x;
yCoord = e.y;
}
else if (document.all){
xCoord = event.clientX;
yCoord = event.clientY;
}
else if (document.getElementById){
xCoord = e.clientX;
yCoord = e.clientY;
}
} function checkwhere(e) { if(!first) return;
getxy();
first=false;
str += "X: "+ xCoord + " Y: " + yCoord +"<br>";
site.innerHTML=str;
}
function click(){
getxy();
str += "X: "+ xCoord + " Y: " + yCoord +"<br>";
site.innerHTML=str;
}
document.onmousemove = checkwhere;
document.onmouseup = click; if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
</script>
<body onmousemove=checkwhere>
<div id=site></div>
</body>调试通过。
我作这鼠标坐标,就是获取别人点我这网页的时候,别人在这网页里的活动轨迹,我获取后如果更好的把这鼠标坐标的参数值,提交到我的后台里
比如我的A页面,上面的代码,就是放在我的A的页面里,我如果把A页面的所产生的所有坐标数据,提交到我的后台里,有什么好的方法,能否交交我