js获取鼠标位置
来源:互联网 发布:刻录dvd软件 编辑:程序博客网 时间:2024/05/21 08:59
<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title></head><body><script>function mouseMove(ev){ ev= ev || window.event; var mousePos = mouseCoords(ev); //alert(ev.pageX); document.getElementById('xxx').value = mousePos.x; document.getElementById('yyy').value = mousePos.y; alert(mousePos.y); }function mouseCoords(ev){ if(ev.pageX || ev.pageY){ return {x:ev.pageX, y:ev.pageY}; } return { x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, y:ev.clientY + document.body.scrollTop - document.body.clientTop };}document.onmousemove = mouseMove;</script> Mouse X Position:<input id=xxx type=text><br>Mouse Y Position:<input id=yyy type=text><br>Mouse Y Position:</body>
0 0
- js获取鼠标位置
- js获取鼠标位置
- js获取鼠标位置
- js获取鼠标位置
- js获取鼠标的位置
- js 获取鼠标的位置
- js获取鼠标点击位置
- js 获取鼠标的位置
- js 获取鼠标的位置
- js怎么样获取鼠标位置
- js获取鼠标坐标位置
- js获取鼠标移动位置
- js获取鼠标点击位置(很旧很旧。。。)
- js获取鼠标位置的各种方法
- js获取鼠标点击的位置
- js获取鼠标和滚动条位置
- js获取鼠标位置的各种方法
- JS获取鼠标位置、当前元素所在位置
- 使用TileMap制作游戏,在cocos2d-x中使用(三)
- hdu 2191
- java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager 2009-01-07 14:04 22
- 认认真真磨练自己的Java技术
- POJ 题目1306 Combinations(排列组合)
- js获取鼠标位置
- 工作笔记_js
- 某奇门遁甲的相关分析
- SGU - 107 - 987654321 problem (简单数学!)
- PHP之分页显示数据-新闻系统
- cocos2dx 制作单机麻将(一)
- Andriod Studio 1.0安装问题
- C++ 容器详解
- 秒杀多线程第二篇 多线程第一次亲密接触 CreateThread与_beginthreadex本质区别