zoukankan
html css js c++ java
脚本如何得到鼠标坐标
JavaScript得到鼠标坐标
代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JavaScript得到鼠标坐标</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="Generator" content="EditPlus" /> <meta name="Author" content="Dicky"> <meta name="Keywords" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com"> <meta name="Description" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com"> <script language="javascript" type="text/javascript"> <!-- function document.onmousemove() { x.innerHTML = "相对位置:X:" + window.event.x + " Y:" + window.event.y; y.innerHTML = "绝对位置:X:" + window.event.screenX + " Y:" + window.event.screenY; } //--> </script> </head> <body> <div id="x"></div> <div id="y"></div> </body> </html>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
VbScript得到鼠标坐标
代码如下:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>VbScript得到鼠标坐标</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta name="Generator" content="EditPlus" /> <meta name="Author" content="Dicky"> <meta name="Keywords" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com"> <meta name="Description" content="Name:Dicky;QQ:25941;MSN:HaiJunGu@HotMail.Com"> <script language="vbscript" type="text/vbscript"> <!-- Function GetMousePos() x.innerHTML = "相对位置:X:" & window.event.x & " Y:" & window.event.y y.innerHTML = "绝对位置:X:" & window.event.screenX & " Y:" & window.event.screenY End Function //--> </script> </head> <body onmousemove="vbscript:GetMousePos()"> <div id="x"></div> <div id="y"></div> </body> </html>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
青苹果Web应用商店
https://webapp.taobao.com/
PHP/ASP.NET/ASP/UCHOME/DISCUZ! X系列网站开发,详细需求联系
QQ:8511978
查看全文
相关阅读:
docker API 配置与使用
docker 启动 nginx 访问不了的问题
微信小程序
JavaScript -- 继承与原型链
Chrome Google 快捷键
jquery中attr和prop的区别
Vue购物车实例
jquery添加html代码的几种方法
DeepFaceLab错误:DLL Load failed 找不到指定模块!
DeepFaceLab:手动提取高精度脸图,减少抖动!
原文地址:https://www.cnblogs.com/Dicky/p/400909.html
最新文章
关于nginx安装、iptables设置和查看端口指令netstat/ss
Linux常用命令总结
BurpSuite工具抓取手机的流量
SSH配置+公钥证书认证方式登录
SQLMap的安装与使用
DVWA-文件包含漏洞
DVWA-弱会话ID
DVWA命令注入漏洞分析
AVL树C++实现
如何用快排思想在O(n)内查找第K大元素--王争《数据结构和算法之美》
热门文章
Linux实用技巧
C++面试题整理(持续更新中)
inline和宏之间的区别
重载、重写和隐藏三者的区别
select poll epoll之间的区别
二叉树总结
TCP三次握手笔记
C++整理
关于parseInt的看法
Vue使用json-server来进行后端数据模拟
Copyright © 2011-2022 走看看