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
查看全文
相关阅读:
MySQL——字符串拆分(含分隔符的字符串截取)
一列数据组合成字符串并用逗号隔开
web最大化,最小化文字错位的问题
Esxi虚拟机安装Ros+Openwrt软路由双系统简单分享(踩到的坑,很大的坑)
跟着老司机免费申请一个域名去!
logging模块
os.rename 和os.replace
装饰器详解
python if not
globals和locals的区别
原文地址:https://www.cnblogs.com/Dicky/p/400909.html
最新文章
RockeyMQ顺序发送
生产者MessageQueueSelector实战
RockeyMQ的发送方式
RockeyMQ的发送状态
RockeyMQ集群代建
Qt学习经验之quit()、exit()、close()《转载》
小循环中每隔一组数据求取之间的差值---小程序
C语言sendto()函数-经socket传送数据以及recvfrom函数《转》
Qt 多线程程序设计
Windows下与Linux下编写socket程序的区别 《转载》
热门文章
TCP/IP协议的编写《转载》
QNX---Interrupt vector numbers(原创!!!)
QNX系统-关于delay函数与sleep函数的区别
Linux-C语言中gettimeofday()函数的使用方法(转载)
QNX---- interrupts 例程
数据库编程学习
在**工VPS上的Ubuntu 18.04安装oracle 11g,并用navicat远程连接。
在**工VPS上的Ubuntu 18.04安装mysql,并用navicat远程连接。
Mysql字符串字段判断是否包含某个字符串的方法
windows下安装navicat15(搬运经验)
Copyright © 2011-2022 走看看