教程: |
第一步:将下面的代码加入<head>和</head>之间:
<SCRIPT language=Javascript>
<!-- Hiding
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
if (bname=="Netscape")
brows=true
else
brows=false
var x=0;
var link=new Array();
function dspl(msg,bgcolor,dtop,delft){
this.msg=msg;
this.bgcolor=bgcolor;
this.dtop=dtop;
this.dleft=delft;
}
link[0]=new dspl('[网页制作入门]<BR>刚开始学习制作主页的网友一定要看看。','bisque',110,430)
link[1]=new dspl('[新技术望远镜]<BR>提供最新的网页制作技术范例,开阔你的眼界。','bisque',135,430)
link[2]=new dspl('[网页精品素材]<BR>阿捷精心搜集的最好的网页素材,相信我的眼光。','bisque',160,430)
link[3]=new dspl('[本站资源下载]<BR>如果您时间宝贵,到下载中心可以下载各栏目的压缩包。','bisque',185,430)
// Do not edit anything else in the script !!!!
function don(x){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
if (brows){
with(link[x]){
document.layers['linkex'].bgColor=bgcolor;
document.layers['linkex'].document.writeln(msg);
document.layers['linkex'].document.close();
document.layers['linkex'].top=dtop;
document.layers['linkex'].left=dleft;
}
document.layers['linkex'].visibility="show";
}
else{
with(link[x]){
linkex.innerHTML=msg;
linkex.style.top=dtop;
linkex.style.left=dleft;
linkex.style.background=bgcolor;
}
linkex.style.visibility="visible";
}
}
}
function doff(){
if ((bname=="Netscape" && bversion>=4) || (bname=="Microsoft Internet Explorer" && bversion>=4)){
if (brows)
document.layers['linkex'].visibility="hide";
else
linkex.style.visibility="hidden";
}
}
// done hiding -->
</SCRIPT>
第二步:将下列代码加入<bady></body>之间任何地方:
<div id="linkex" style="POSITION: absolute; VISIBILITY: hidden; WIDTH: 20%">
</div>
<LAYER width = 20% visibility = hide name = linkex></LAYER>
第三步:将下面的代码加入<body></body>之间你需要的地方:
<a href="http://java2000.wol.com.cn/index.html" onmouseout="doff()" onmouseover="don(0)" target="_top">[网页制作入门]</a><br>
<br>
<a href="http://java2000.wol.com.cn/index.html" onmouseout="doff()" onmouseover="don(1)" target="_top">[新技术望远镜]</a><br>
<br>
<a href="http://java2000.wol.com.cn/index.html" onmouseout="doff()" onmouseover="don(2)" target="_top">[网页精品素材]</a><br>
<br>
<a href="http://java2000.wol.com.cn/index.html" onmouseout="doff()" onmouseover="don(3)" target="_top">[本站资源下载]</a>
|