類似Windows自訂過的滑鼠

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<html><head><title>類似Windows自訂過的滑鼠</title><!--將以下代碼加入HTML的<Body></body>之間--><SCRIPT language=JavaScript1.2>var trailLength = 8;var path = "images/cursor1.gif";var isIE = false, isNav = false, range = "all.", style = ".style", i, d = 0;var topPix = ".pixelTop", leftPix = ".pixelLeft", images, storage;if (document.layers) {isNav = true, range = "layers.", style = "", topPix = ".top", leftPix = ".left";} else if (document.all) {isIE = true;}function initTrail() {images = new Array();for (i = 0; i < parseInt(trailLength); i++) {images[i] = new Image();images[i].src = path;}storage = new Array();for (i = 0; i < images.length*3; i++) {storage[i] = 0;}for (i = 0; i < images.length; i++) {(isIE) ? document.write('<div id="obj' + i + '" ></div>') : document.write('<layer name="obj' + i + '" width="0" height="0" z-index="100"></layer>');}trail();}function trail() {for (i = 0; i < images.length; i++) {eval("document." + range + "obj" + i + style + topPix + "=" + storage[d]);eval("document." + range + "obj" + i + style + leftPix + "=" + storage[d+1]);d = d+2;}for (i = storage.length; i >= 2; i--) {;storage[i] = storage[i-2];}d = 0;clearTimeout(timer);var timer = setTimeout("trail()", 10);}function processEvent(e) {if (isIE) {storage[0] = window.event.y+document.body.scrollTop+10;storage[1] = window.event.x+document.body.scrollLeft+10;} else {storage[0] = e.pageY+12;storage[1] = e.pageX+12; }}if (isNav) {document.captureEvents(Event.MOUSEMOVE);}if (isIE || isNav) {initTrail();document.onmousemove = processEvent;}</sCRIPT><!--將以下代碼加入HTML的<Head></head>之間--><style type="text/css"><!--body {CURSOR: url('Images/cur.ani')}--></style></head><BODY></body></html>
提示:您可以先修改部分代碼再運行
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.