|
 |
栏目导栏 |
|
| |
|
|
|
|
 |
资料搜索 |
|
| |
|
|
|
|
 |
热门文章 |
|
| |
|
|
|
|
 |
最新文章 |
|
| |
|
|
|
| |
| |
|
|
|
|
<html> aBtLinux联盟 <head> aBtLinux联盟 <script language="javascript" type="text/javascript"> aBtLinux联盟 <!-- aBtLinux联盟 var domType = ''; aBtLinux联盟 if (document.all) { aBtLinux联盟 domType = "ie4"; aBtLinux联盟 } else if (document.getElementById) { aBtLinux联盟 domType = "std"; aBtLinux联盟 } else if (document.layers) { aBtLinux联盟 domType = "ns4"; aBtLinux联盟 } aBtLinux联盟 function initMouseMove(){ aBtLinux联盟 if(!document.all){ aBtLinux联盟 document.captureEvents(Event.MOUSEMOVE); aBtLinux联盟 } aBtLinux联盟 document.onmousemove = mouseMove; aBtLinux联盟 } aBtLinux联盟 function mouseMove(e){ aBtLinux联盟 var x,y; aBtLinux联盟 if(!document.all){ aBtLinux联盟 fetch_object("txt").value="move"; aBtLinux联盟 x=e.pageX; aBtLinux联盟 y=e.pageY; aBtLinux联盟 }else{ aBtLinux联盟 x=document.body.scrollLeft+event.clientX; aBtLinux联盟 y=document.body.scrollTop+event.clientY; aBtLinux联盟 } aBtLinux联盟 fetch_object("txt").value=x+":"+y; aBtLinux联盟 } aBtLinux联盟 var objects=new Array(); aBtLinux联盟 aBtLinux联盟 function fetch_object(idname, forcefetch) { aBtLinux联盟 if (forcefetch || typeof(objects[idname]) == "undefined") { aBtLinux联盟 switch (domType) { aBtLinux联盟 case "std": { aBtLinux联盟 objects[idname] = document.getElementById(idname); aBtLinux联盟 } aBtLinux联盟 break; aBtLinux联盟 aBtLinux联盟 case "ie4": { aBtLinux联盟 objects[idname] = document.all[idname]; aBtLinux联盟 } aBtLinux联盟 break; aBtLinux联盟 aBtLinux联盟 case "ns4": { aBtLinux联盟 objects[idname] = document.layers[idname]; aBtLinux联盟 } aBtLinux联盟 break; aBtLinux联盟 } aBtLinux联盟 } aBtLinux联盟 return objects[idname]; aBtLinux联盟 } aBtLinux联盟 --> aBtLinux联盟 </script> aBtLinux联盟 <title>get mouse position</title> aBtLinux联盟 </head> aBtLinux联盟 <body onload="initMouseMove()"> aBtLinux联盟 <input id="txt"/> aBtLinux联盟 </body> aBtLinux联盟 </html>
Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论 |
|
|
|
|
|