5-3.htm

来自「JScript网页特效,包含很多的实现网页特效的方法.」· HTM 代码 · 共 85 行

HTM
85
字号
<html>
<head>
<title>§5.3 带浮动条说明的文字链接:</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--//Begin code
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',20,100)

link[1]=new dspl('[我的栏目一]<BR>这里是我的栏目一','bisque',45,120)

link[2]=new dspl('[我的栏目二]<BR>这里是我的栏目二','bisque',70,120)

link[3]=new dspl('[给喜悦来信]<BR>欢迎大家给我来信,地址:future3@yeah.net','bisque',95,120)

// 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";
}
}

// -- End code -->
</script>
</head>

<body bgcolor="#FFFFFF">
<Div id="linkex" style="position: absolute; visibility: hidden; width: 150"> 
</Div>
<Layer name="linkex" visibility="hide" width=150>
</Layer>
<p align="left"> <a href="time1" onmouseover="don(0)" onmouseout="doff()" target="_blank">[站长介绍]</a><BR>
  <BR>
  <a href="time2" onmouseover="don(1)" onmouseout="doff()" target="_blank">[我的栏目一]</a><BR>
  <br>
  <a href="time3" onmouseover="don(2)" onmouseout="doff()" target="_blank">[我的栏目二]</a><BR>
  <BR>
  <a href="time4" onmouseover="don(3)" onmouseout="doff()" target="_blank">[给喜悦来信]</a></p>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?