0


歡迎光臨!! 救國團台中學苑 社會教育研習中心 電腦班隊研習營【網頁設計課程】


游標特效語法




跟屁蟲游標

<script language="Javascript">
<!--
gs9768=n=m=0;k=9;ns=navigator.appName=="Netscape";
gs1=new Image();
gs1.src="
http://wssh0812.myweb.hinet.net/03/cdh2.gif"
gs2=new Image();
gs2.src="
http://wssh0812.myweb.hinet.net/03/cdh1.gif"
function ner(){return true}
window.onerror=ner
function pop(name){
i=document.cookie.indexOf(name+"=");
if(i!=-1){
i=document.cookie.indexOf("=",i)+1;
j=document.cookie.indexOf("#",i);
if(j!=-1)return document.cookie.substring(i,j)}}
function ps(name,value){document.cookie=name+"="+value+"#"}
if(!(ym=parseInt(pop("tsym"))))ym=0;if(!(y=parseInt(pop("tsy"))))y=0;if(!(xm=parseInt(pop("tsxm"))))xm=100;if(!(x=parseInt(pop("tsx"))))x=0;if(!(m=parseInt(pop("tsm"))))m=0;
function DM(){if(m)ps("tsm",--m);else ps("tsm",++m)}
function M(e){
if(n){
if(ns){
ts.left=x=e.pageX-xm;ts.top=y=e.pageY-ym
}else{
ts.left=x=document.body.scrollLeft+event.clientX-xm;ts.top=y=document.body.scrollTop+event.clientY-ym;event.returnValue=false}
}else{
if(ns){
xm=e.pageX;ym=e.pageY
}else{
xm=document.body.scrollLeft+event.clientX;ym=document.body.scrollTop+event.clientY}}}
function dd(){
if(ns){ps("tsx",x);ps("tsy",y)}
if(n){
if(ns){ps("tsxm",xm+x);ps("tsym",ym+y)}
}else{
if(ns){ps("tsxm",xm);ps("tsym",ym)}
gs9768=xm-x;
if(gs9768>60&&k<0){k=-k;document.t.src=gs2.src}
if(gs9768<40&&k>0){k=-k;document.t.src=gs1.src}
if(!m){
if((gs9768>120&&k>0)||(gs9768<-20&&k<0)){ts.left=x+=k}
gs9768=ym-y;
if(gs9768>85)ts.top=y+=9;
if(gs9768<-5)ts.top=y-=9}}}
function MD(e){
if(ns){
xm=e.pageX;ym=e.pageY
}else{
xm=document.body.scrollLeft+event.clientX;ym=document.body.scrollTop+event.clientY}
if(xm<x+80&&xm>x+10&&ym<y+70&&ym>y+10){
if(!ns){
if(event.button<2){xm=xm-x;ym=ym-y;n=1}
}else{
xm=xm-x;ym=ym-y;n=1;return false
}
}
}
function MU(){if(n){n=0;xm+=x;ym+=y}}
function cls(){ps("tsym",ym);ps("tsy",y);ps("tsxm",xm);ps("tsx",x)}
if(!ns)window.onunload=cls;
if(ns)document.captureEvents(Event.DBLCLICK|Event.MOUSEDOWN|Event.MOUSEUP|Event.MOUSEMOVE);
document.onmousemove=M;document.onmouseup=MU;document.onmousedown=MD;document.ondblclick=DM;
document.write("<div id=ts style=position:absolute;width:96;height:80;z-index:10><img name=t src="+gs2.src+"></div>");
var ts=(ns)?document.ts:document.all.ts.style;ts.left=x;ts.top=y;dd();setInterval("dd()",100)
-->
</script>


上一頁下一頁 │                                      │ 回首頁 回特效語法  │