175、点击出现链接

175、点击出现链接

脚本说明:

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

 

<center><font color=red face="隶书" size=6>点击出现链接</font></center>

<br>

<center>

<table border=5 bordercolor=blue borderlight=green>

<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>下面框中为脚本显示区</strong></font></td></tr>

<tr><td align=left height=90 width=400>

<div id=Out0 style="position:relative; left:20; top:+15px; width:90%;" >

  <span id=Out1 class=Outline style="hand: hand; "></span><b id=Out1 class=Outline style="cursor: hand; ">点击这里出现链接</b>

  <div id=Out1details style="display:None; position:relative; left:12;">

       <P>

<u><a href=http://www.7stk.com target=_blank>网页特效代码</a></u>

<P>

        <U><a href=http://www.sohu.com target=_blank>搜狐</a></u>

<P>

<u><a href=http://www.sina.com.cn target=_blank>新浪</a></u>

<P>     <U><a href=http://www.yahoo.com target=_blank>雅虎</a></u>

<P>

<u><a href=http://www.263.com target=_blank>北京在线</a></u>

<P>     <U><a href=http://www.7stk.com/fine/ch/c01.htm target=_blank>祝福你,圣诞节快快乐乐、幸幸福福</a></u>

<P>

<u><a href=http://www.7stk.com/fine/ny/n1.htm target=_blank>2008年新年祝福网页</a></u>

<p>

  </div>

</div>

<script language=JavaScript>

 

function clickHandler() {

  var targetId, srcElement, targetElement;

  srcElement = window.event.srcElement;

  if (srcElement.className == "Outline") {

     targetId = srcElement.id + "details";

     targetElement = document.all(targetId);

     if (targetElement.style.display == "none") {

        targetElement.style.display = "";

     } else {

        targetElement.style.display = "none";

     }

  }

}

 

document.onclick = clickHandler;

 

</script>

 

Write a comment

Comments: 0