146、带颜色的导航说明

146、带颜色的导航说明

脚本说明:

把如下代码加入<body>区域中

<STYLE TYPE="text/css">

<!--

BODY {OVERFLOW:scroll;OVERFLOW-X:hidden}

.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}

//-->

</STYLE>

<DIV ID="dek" CLASS="dek"></DIV>

 

<SCRIPT TYPE="text/javascript">

<!--

 

Xoffset=-60;    // modify these values to ...

Yoffset= 20;    // change the popup position.

 

var nav,old,iex=(document.all),yyy=-1000;

if(navigator.appName=="Netscape"){(document.layers)?nav=true:old=true;}

 

if(!old){

var skn=(nav)?document.dek:dek.style;

if(nav)document.captureEvents(Event.MOUSEMOVE);

document.onmousemove=get_mouse;

}

 

function popup(msg,bak){

var content="<TABLE  WIDTH=150 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+

"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";

if(old){alert(msg);return;}

else{yyy=Yoffset;

 if(nav){skn.document.write(content);skn.document.close();skn.visibility="visible"}

 if(iex){document.all("dek").innerHTML=content;skn.visibility="visible"}

 }

}

 

function get_mouse(e){

var x=(nav)?e.pageX:event.x+document.body.scrollLeft;skn.left=x+Xoffset;

var y=(nav)?e.pageY:event.y+document.body.scrollTop;skn.top=y+yyy;

}

 

function kill(){

if(!old){yyy=-1000;skn.visibility="hidden";}

}

 

//-->

</SCRIPT>

<a href="http://www.7stk.com/" ONMOUSEOVER="popup('国内最大的网站编程资源站,你一定不可错过.','red')"; ONMOUSEOUT="kill()">网页特效代码</a>

Write a comment

Comments: 0