滑鼠帶圖

檔案下載 : 1

將下列程式碼複製至<head>程式碼</head>區內

<div id="cursor" style="position:absolute; left: 0px; top: 0px; width: 100px; height: 25px; z-index:0; visibility: visible">
<img src="logo.jpg" ></div>
<script language="JavaScript">
<!--
function YY_Mousetrace(evnt) { //v1.2 copyright (c) 1998 Yaro von Flocken
if (yyns4)
{if (evnt.pageX) {yy_ml=evnt.pageX; yy_mt=evnt.pageY;} }
else{
yy_ml=(event.clientX + document.body.scrollLeft);
yy_mt=(event.clientY + document.body.scrollTop);
}
if (yy_tracescript)eval(yy_tracescript)
}
function m()
{
document.all.cursor.style.left=yy_ml+10
document.all.cursor.style.top=yy_mt+10
}


//-->
</script>
<script language="JavaScript">
<!--
var yyns4=window.Event?true:false; var yy_mt = 0; var yy_ml = 0;
if (yyns4) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = YY_Mousetrace;
yy_tracescript = 'm()';
//-->
</script>