<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > < HTML xmlns= "http://www.w3.org/1999/xhtml" > <pead> <title> Cursor with JavaScript for outbound links-Beautiful Styl E«style of the United States»loaoao.com </title> <meta http-equiv= "Content-type" content= text/html; Charset=utf-8 "/> <meta name= KEYWords" content= "Js,cursor,outlinks,links,jscc,css,xhtml,effect"/> < Meta name= "DEscription" content= "cursor for outbound links with JavaScript"/> <meta name= "Author" content= "Aoao"/> < Meta content= "All" name= "robots"/> <link rel= "Start" href= "http://www.loaoao.com" title= "Home"/> <script t Ype= "Text/javascript" > * * AUTHOR:AOAO * homepage:http://www.loaoao.com * email:loaoao@gmail.com/qq:22 22342 * Copyright (c) 2006 AOAO * Licensed under a Creative Commons Attribution 2.5 License (http://creativecommons. ORG/LICENSES/BY/2.5/) */var JSCC = new Object (); Jscc = {Init:function () {/*_*/}, Path: "/scripts/jscc/", include:function (file) {var j=document.cr Eateelement ("script"); J.setattribute (' type ', ' text/javascript '); J.setattribute (' src ', jscc.path+file+ '. js '); document.getElementsByTagName ("Head") [0].appendchild (j); } }; jscc.addevent = function (obj, type, fn) {if (obj.attachevent) {obj[' e ' +type+fn] = fn; OBJ[TYPE+FN] = function () {obj[' E ' +type+fn] (window.event);} Obj.attachevent (' On ' +type, OBJ[TYPE+FN]); else {obj.addeventlistener (type, FN, false); } }; Jscc.getposition=function (e) {e = e | | window.event; var cursor = {x:0, y:0}; if (E.pagex | | e.pagey) {cursor.x = E.pagex; Cursor.y = E.pagey; else {cursor.x = E.clientx + (Document.documentElement.scrollLeft | | document.body.scrollLeft)-Document . Documentelement.clientleft; Cursor.y = E.clienty + (Document.documentElement.scrollTop | | DOCUMENT.BODY.SCROLLTOP)-Document.documentElement.clientTop; return cursor; }; Jscc.widgets = {/**/}; jscc.widgets.outlinks={init:function () {var Outsiteicon = document.createelement ("div"); Outsiteicon.setattribute (' id ', ' outsiteicon '); document.getElementsByTagName ("Body"). Item (0). appendchild (Outsiteicon); Outsiteicon.innerhtml= ""; var as = document.getElementsByTagName ("a"); Aslen = As.length; var url= "http://lab.loaoao.com"; for (var i=0;i< aslen i++) {if (As[i].href.indexof (URL) &&as[i].href!= "") {//JSCC. Addevent (As[i], "mouseover", jscc.widgets.outLinks.show); Jscc.addevent (As[i], "MouseMove", jscc.widgets.outLinks.show); Jscc.addevent (As[i], "mouseout", jscc.widgets.outLinks.hide); As[i].target = "_blank"; }}, Show:function (e) { if (e!=undefined) {var Outsiteicon = document.getElementById ("Outsiteicon"); outsiteicon.style.display= "Block"; Cursorcoordinate = new Jscc.getposition (e); outsiteicon.style.top=cursorcoordinate.y-4 + "px"; Outsiteicon.style.left=cursorcoordinate.x + 5 + "px"; }, Hide:function () {var Outsiteicon = document.getElementById ("Outsiteicon"); OutSiteIcon.style.display = "None"; } window.onload = function () {jscc.widgets.outLinks.init (); } </script> <style type= "Text/css" > #outSiteIcon {position:absolute; z-index:99; Display:none; } </style> </pead> <body> <p> cursor with JavaScript for outbound links the </p> <p> was used for its own use, Did not put the picture path written as a variable to save, Link test: Laboratory home, Google. </p> <p>copyright©2006 Aoao, Some Rights Reserved .</p> <!--statistics code start--> <script SR C= "Http://www.google-analytics.com/urchin.js"Type=" Text/javascript "></script> <script type=" Text/javascript "> _uacct =" ua-600690-2 "; Urchintracker (); </script> <!--statistic code end--> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]