您现在的位置是:永利皇宫网页入口-yl6809永利官网 > 网站推广
firefox中用js实现鼠标位置的定位-永利皇宫网页入口
襄阳襄助网络有限公司2024-08-19 00:19:57【网站推广】7人已围观
简介襄阳襄助网络有限公司(www.scgcj09.com)成立于2018年,专注于二手车交易,提供车辆检测、评估和售后保障,让您购车无忧。二手车电话:13784369741,欢迎来电。
/** *取得鼠标坐标

*@returnposition

*/

functiongetmouselocation(){
if(ns4||ns6){
mousex=e.pagex;
mousey=e.pagey;
}
else{
mousex=event.x document.body.scrollleft;
mousey=event.y document.body.scrolltop;
}
return{ x:mousex,中置y:mousey};
}
在strict下document.body要改成document.documentelement

*@returnposition

*/

functiongetmouselocation(){
if(ns4||ns6){
mousex=e.pagex;
mousey=e.pagey;
}
else{
mousex=event.x document.body.scrollleft;
mousey=event.y document.body.scrolltop;
}
return{ x:mousex,中置y:mousey};
}
在strict下document.body要改成document.documentelement
以上就是【firefox中用js实现鼠标位置的定位】的全部内容了,欢迎留言评论进行交流!
很赞哦!(44)