Mon

02

Mar

2009

235、抽屉式菜单

235、抽屉式菜单

1   把如下代码复制到<head></head>之间

 

 

<style>

A{color:blue; text-decoration:none}

A:hover{color:red;text-decoration:underline;}

A:link{text-decoration:none;}

 

TD{font-family:宋体,helvetica; font-size:9pt}

DIV.clTopMenu{position:absolute; width:97; height:150; clip:rect(0,101,14,0); visibility:hidden; z-index:31; }

DIV.clTopMenuBottom{position:absolute; width:97; height:3; clip:rect(0,101,3,0); top:11; layer-background-color:#c0c000; background-color:#c0c000; z-index:2}

DIV.clTopMenuText{position:absolute; width:88; left:5; top:15; font-family:宋体,helvetica; font-size:9pt; z-index:1;layer-background-color:#C8C8FF; background-color:#C8C8FF}

</style>

 

<script>

 

ie=document.all?1:0

n=document.layers?1:0

 

 

/***设置变量***/

var numberOfMenus=1 //这个变量是定义有几个抽屉式菜单。0代表有一个1代表有两个需要在<body></body>中定义不同的菜单定义

 

var mwidth=97 //菜单文字的宽度

 

var pxBetween=10 //两个或多个菜单的间隔单位像素

 

var fromLeft=20 //第一个菜单的左边边距单位像素

 

var fromTop=10 //菜单的上边距单位像素

 

var bgColor='#c0c000' //当鼠标没有移入菜单头时,菜单底的颜色

 

var bgColorChangeTo='#c0c000'//当鼠标移入菜单头时,菜单底的颜色

 

var imageHeight=13 //菜单头的高度(单位:像素)

 

 

/***下面的程序如果你不是高手,请不要更改***/

 

//构造对象

function makeNewsMenu(obj,nest){

        nest=(!nest) ? '':'document.'+nest+'.'                                       

        this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')       

        this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offsetHeight')

        this.moveIt=b_moveIt;this.bgChange=b_bgChange;

        this.slideUp=b_slideUp; this.slideDown=b_slideDown;

        this.clipTo=b_clipTo;

    this.obj = obj + "Object";         eval(this.obj + "=this")               

}

 

//对像的方法

function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}

function b_bgChange(color){if(ie) this.css.backgroundColor=color; else this.css.bgColor=color}

function b_clipTo(t,r,b,l){

        if(n){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b; this.css.clip.left=l

        }else this.css.clip="rect("+t+","+r+","+b+","+l+")";

}

function b_slideUp(ystop,moveby,speed,fn,wh){

        if(!this.slideactive){

                if(this.y>ystop){

                        this.moveIt(this.x,this.y-5); eval(wh)

                        setTimeout(this.obj+".slideUp("+ystop+","+moveby+","+speed+",'"+fn+"','"+wh+"')",speed)

                }else{

                        this.slideactive=false; this.moveIt(0,ystop); eval(fn)

                }

        }

}

function b_slideDown(ystop,moveby,speed,fn,wh){

        if(!this.slideactive){

                if(this.y<ystop){

                        this.moveIt(this.x,this.y+5); eval(wh)

                        setTimeout(this.obj+".slideDown("+ystop+","+moveby+","+speed+",'"+fn+"','"+wh+"')",speed)

                }else{

                        this.slideactive=false; this.moveIt(0,ystop); eval(fn)

                }

        }

}

 

//初始化,并建立一个跨浏览器的页

function newsMenuInit(){

        oTopMenu=new Array()

        for(i=0;i<=numberOfMenus;i++){

                oTopMenu[i]=new Array()

                oTopMenu[i][0]=new makeNewsMenu('divTopMenu'+i)

                oTopMenu[i][1]=new makeNewsMenu('divTopMenuBottom'+i,'divTopMenu'+i)

                oTopMenu[i][2]=new makeNewsMenu('divTopMenuText'+i,'divTopMenu'+i)

                oTopMenu[i][1].moveIt(0,imageHeight)

                oTopMenu[i][0].clipTo(0,mwidth,imageHeight+3,0)

                oTopMenu[i][0].moveIt(i*mwidth+fromLeft+(i*pxBetween),fromTop)

                oTopMenu[i][0].css.visibility="visible"

        }

}

 

//当点击后,移到菜单,就像抽屉一样打开菜单

function topMenu(num){

        if(oTopMenu[num][1].y==imageHeight) oTopMenu[num][1].slideDown(oTopMenu[num][2].scrollHeight+20,10,40,'oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)')

        else if(oTopMenu[num][1].y==oTopMenu[num][2].scrollHeight+20) oTopMenu[num][1].slideUp(imageHeight,10,40,'oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)')

}

//当鼠标进入时,

function menuOver(num){oTopMenu[num][1].bgChange(bgColorChangeTo)}

function menuOut(num){oTopMenu[num][1].bgChange(bgColor)}

 

 

//在页面载入的时候初始化菜单

onload=newsMenuInit;

</script>

 

 

2     把如下代码复制到<body></body>之间

 

 

<!-- 第一个菜单定义 -->

        <div id="divTopMenu0" class="clTopMenu"><a href="#" onmouseover="menuOver(0)" onmouseout="menuOut(0)" onclick="topMenu(0); if(ie)this.blur(); return false">菜单一</a>

        <div id="divTopMenuText0" class="clTopMenuText"><center>

                <a href="http://www.7stk.com/background/index.htm" target="_blank">背景按钮特效</a><br>

                <a href="http://www.7stk.com/navigation/index.htm" target="_blank">导航菜单特效</a><br>

                <a href="http://www.7stk.com/img/index.htm" target="_blank">网页图片特效</a><br>

                <a href="http://www.7stk.com/text/index.htm" target="_blank">网页文本特效</a><br>

                <a href="http://www.7stk.com/time/index.htm" target="_blank">时间日期特效</a><br>

                <a href="http://www.7stk.com/state/index.htm" target="_blank">状态栏特效</a><br>

                <a href="http://www.7stk.com/other/index.htm" target="_blank">另类网页特效</a></center>

        </div>

        <div id="divTopMenuBottom0" class="clTopMenuBottom"></div>

        </div>

 

<!--第一个菜单定义结束 -->

 

<!-- 第二个菜单定义 -->

        <div id="divTopMenu1" class="clTopMenu"><a href="#" onmouseover="menuOver(1)" onmouseout="menuOut(1)" onclick="topMenu(1); if(ie)this.blur(); return false">菜单二</a>

        <div id="divTopMenuText1" class="clTopMenuText"><center>

                <a href="http://www.7stk.com/background/index.htm" target="_blank">背景按钮特效</a><br>

                <a href="http://www.7stk.com/navigation/index.htm" target="_blank">导航菜单特效</a><br>

                <a href="http://www.7stk.com/img/index.htm" target="_blank">网页图片特效</a><br>

                <a href="http://www.7stk.com/text/index.htm" target="_blank">网页文本特效</a><br>

                <a href="http://www.7stk.com/time/index.htm" target="_blank">时间日期特效</a><br>

                <a href="http://www.7stk.com/state/index.htm" target="_blank">状态栏特效</a><br>

                <a href="http://www.7stk.com/other/index.htm" target="_blank">另类网页特效</a></center>

        </div>

        <div id="divTopMenuBottom1" class="clTopMenuBottom"></div>

        </div>

 

<!--第二个菜单定义结束 -->

 

0 Comments

Mon

02

Mar

2009

234、详细的导航脚本2

234、详细的导航脚本2

以下代码加入<head>区域

<script language="JavaScript">

 

<!--

 

function go_to_station(){

 

       if (document.stationform.stationselect.options[0].selected){

 

              window.location.href = "../../../../java2000.126.com/default.htm";}

 

              else if (document.stationform.stationselect.options[1].selected)            

 

      {     window.location.href = "../../../../zjjg.yeah.net/default.htm";}   

 

       else if (document.stationform.stationselect.options[2].selected)         

 

       {     window.location.href = "../../../../mcg.yeah.net/default.htm";}

 

       else if (document.stationform.stationselect.options[3].selected)         

 

       {     window.location.href = "../../../../tonyest.yeah.net/default.htm";}     

 

       else if (document.stationform.stationselect.options[4].selected)         

 

       {     window.location.href = "../../../../cp33.yeah.net/default.htm";}

 

              else if (document.stationform.stationselect.options[5].selected)            

 

       {     window.location.href = "../../../../ftp.maoming.gd.cn/e/yanghai";}           

 

             else if (document.stationform.stationselect.options[6].selected)       

 

       {     window.location.href = "../../../../jgq.yeah.net/default.htm";}           

 

             else if (document.stationform.stationselect.options[7].selected)       

 

       {     window.location.href = "../../../../nns.yeah.net/default.htm";}    

 

             return true;  

 

       }

 

//This is were you load the Discription and the Author

 

function textValue(){    

 

       if (document.stationform.stationselect.options[0].selected){

 

              document.stationform.disc.value = "Java脚本下载资源站"

 

              document.stationform.author.value = "【最酷的Java脚本资源站】";}

 

              else if (document.stationform.stationselect.options[1].selected)            

 

       {     document.stationform.disc.value = "军事动态新闻及MUD"

 

              document.stationform.author.value = "【军事与泥巴】";}

 

       else if (document.stationform.stationselect.options[2].selected)         

 

       {     document.stationform.disc.value = "培训教学"

 

              document.stationform.author.value = "【微软认证专家园地】";}

 

       else if (document.stationform.stationselect.options[3].selected)         

 

       {     document.stationform.disc.value = "电脑网络"

 

              document.stationform.author.value = "【梧桐世界】";}   

 

       else if (document.stationform.stationselect.options[4].selected)         

 

       {     document.stationform.disc.value = "图形图象制作"

 

              document.stationform.author.value = "【菜盆的'无中生有'";}

 

              else if (document.stationform.stationselect.options[5].selected)            

 

       {     document.stationform.disc.value = "美术吉它"

 

              document.stationform.author.value = "【杨海“倾心小筑”】";}     

 

       else if (document.stationform.stationselect.options[6].selected)         

 

       {     document.stationform.disc.value = "电脑网络"

 

              document.stationform.author.value = "【江光强主页】";}

 

              else if (document.stationform.stationselect.options[7].selected)            

 

       {     document.stationform.disc.value = "游戏,编程"

 

              document.stationform.author.value = "【未名创作室】";}

 

       return true;    

 

       }

 

 

 

//-->

 

</script>

 

<div align="center"><font color="#ffffff" size="5">

 

 

 

<p align="center">不错的友情连接脚本</font> </p>

 

</div>

 

 

 

<form name="stationform">

 

  <table>

 

<TBODY>

 

    <tr>

 

      <td><select class="yk9" multiple name="stationselect" onchange="textValue()" size="8">

 

        <option>Java2000</option>

 

        <option>军事与泥巴</option>

 

        <option>微软认证专家园地</option>

 

        <option>梧桐世界</option>

 

        <option>菜盆的"无中生有"</option>

 

        <option>杨海“倾心小筑”</option>

 

        <option>江光强主页</option>

 

        <option>未名创作室</option>

 

      </select> </td>

 

      <td>站点名称<br>

 

      <textarea class="yk9" cols="40" name="author" rows="1"></textarea> <br>

 

      站点主题<br>

 

      <textarea class="yk9" cols="40" name="disc" rows="3" wrap="physical"></textarea> </td>

 

    </tr>

 

</TBODY>

 

  </table>

 

<input class="yk9" name="stationbutton" onclick="go_to_station()"

 

  type="button" value="参观参观">

 

</form>

 

以下代码加入<body>区域

 

0 Comments

Mon

02

Mar

2009

233、详细的导航脚本1

233、详细的导航脚本1

以下代码加入<head>区域

<script language="JavaScript">

 

<!--

 

function go_to_station(){

 

       if (document.stationform.stationselect.options[0].selected){

 

              window.location.href = "../../../../java2000.126.com/default.htm";}

 

              else if (document.stationform.stationselect.options[1].selected)            

 

      {     window.location.href = "../../../../zjjg.yeah.net/default.htm";}   

 

       else if (document.stationform.stationselect.options[2].selected)         

 

       {     window.location.href = "../../../../mcg.yeah.net/default.htm";}

 

       else if (document.stationform.stationselect.options[3].selected)         

 

       {     window.location.href = "../../../../tonyest.yeah.net/default.htm";}     

 

       else if (document.stationform.stationselect.options[4].selected)         

 

       {     window.location.href = "../../../../cp33.yeah.net/default.htm";}

 

              else if (document.stationform.stationselect.options[5].selected)            

 

       {     window.location.href = "../../../../ftp.maoming.gd.cn/e/yanghai";}           

 

             else if (document.stationform.stationselect.options[6].selected)       

 

       {     window.location.href = "../../../../jgq.yeah.net/default.htm";}           

 

             else if (document.stationform.stationselect.options[7].selected)       

 

       {     window.location.href = "../../../../nns.yeah.net/default.htm";}    

 

             return true;  

 

       }

 

//This is were you load the Discription and the Author

 

function textValue(){    

 

       if (document.stationform.stationselect.options[0].selected){

 

              document.stationform.disc.value = "Java脚本下载资源站"

 

              document.stationform.author.value = "【最酷的Java脚本资源站】";}

 

              else if (document.stationform.stationselect.options[1].selected)            

 

       {     document.stationform.disc.value = "军事动态新闻及MUD"

 

              document.stationform.author.value = "【军事与泥巴】";}

 

       else if (document.stationform.stationselect.options[2].selected)         

 

       {     document.stationform.disc.value = "培训教学"

 

              document.stationform.author.value = "【微软认证专家园地】";}

 

       else if (document.stationform.stationselect.options[3].selected)         

 

       {     document.stationform.disc.value = "电脑网络"

 

              document.stationform.author.value = "【梧桐世界】";}   

 

       else if (document.stationform.stationselect.options[4].selected)         

 

       {     document.stationform.disc.value = "图形图象制作"

 

              document.stationform.author.value = "【菜盆的'无中生有'";}

 

              else if (document.stationform.stationselect.options[5].selected)            

 

       {     document.stationform.disc.value = "美术吉它"

 

              document.stationform.author.value = "【杨海“倾心小筑”】";}     

 

       else if (document.stationform.stationselect.options[6].selected)         

 

       {     document.stationform.disc.value = "电脑网络"

 

              document.stationform.author.value = "【江光强主页】";}

 

              else if (document.stationform.stationselect.options[7].selected)            

 

       {     document.stationform.disc.value = "游戏,编程"

 

              document.stationform.author.value = "【未名创作室】";}

 

       return true;    

 

       }

 

 

 

//-->

 

</script>

 

<div align="center"><font color="#ffffff" size="5">

 

 

 

<p align="center">不错的友情连接脚本</font> </p>

 

</div>

 

 

 

<form name="stationform">

 

  <table>

 

<TBODY>

 

    <tr>

 

      <td><select class="yk9" multiple name="stationselect" onchange="textValue()" size="8">

 

        <option>Java2000</option>

 

        <option>军事与泥巴</option>

 

        <option>微软认证专家园地</option>

 

        <option>梧桐世界</option>

 

        <option>菜盆的"无中生有"</option>

 

        <option>杨海“倾心小筑”</option>

 

        <option>江光强主页</option>

 

        <option>未名创作室</option>

 

      </select> </td>

 

      <td>站点名称<br>

 

      <textarea class="yk9" cols="40" name="author" rows="1"></textarea> <br>

 

      站点主题<br>

 

      <textarea class="yk9" cols="40" name="disc" rows="3" wrap="physical"></textarea> </td>

 

    </tr>

 

</TBODY>

 

  </table>

 

<input class="yk9" name="stationbutton" onclick="go_to_station()"

 

  type="button" value="参观参观">

 

</form>

 

以下代码加入<body>区域

 

0 Comments

Mon

02

Mar

2009

232、一个动态导航脚本

232、一个动态导航脚本

以下代码加入<head>区域

以下代码加入<body>区域

<SCRIPT LANGUAGE="JavaScript">

 

 

 

//by Leif King e-mail:leif.d.king@vanderbilt.edu

 

//Feel free to use this or modify it Please leave this comment.

 

 

 

function makeArray(q){

 

for(i=1 ; i < q ; i++){this[i]=0}}

 

w=1;

 

howmanysites=4; // How many sites are listed below?

 

 

 

Sites = new makeArray(howmanysites);

 

 

 

Sites[1] = "http://www.7stk.com/";

 

//put yoursites then | and what you want the box to show here's where I got the orig.

 

Sites[2] = "../../../../www.geocities.com_7cfreewebspace!/default.htm";

 

Sites[3] = "../../../../www.yahoo.com_7cgreatsearchengine!/default.htm";

 

 

 

function showSites() {

 

if (w > howmanysites) { w=1; };

 

var string=Sites[w] + "";

 

var split=string.indexOf("|");

 

var url=string.substring(0,split);

 

var word=string.substring(split + 1,string.length);

 

document.form.url.value=url;

 

document.form.word.value=word;

 

w+=1;

 

window.setTimeout('showSites()',5000);

 

 

 

}

 

function visitSite() {

 

window.location=document.form.url.value;

 

}

 

</SCRIPT>

 

<center>

 

<form name=form>

 

<table><tr><td align=center>

 

<input type=hidden name=url value="">

 

<input type=text name=word value="" onFocus="visitSite()" size=40>

 

</td></tr></table>

 

</form>

 

</center>

 

<script>

 

showSites();

 

</script>

 

0 Comments

Mon

02

Mar

2009

231、随意选择要去的地方

231、随意选择要去的地方

以下代码加入<head>区域

以下代码加入<body>区域

<SCRIPT LANGUAGE="JavaScript">

 

 

 

function makeArray(q){

 

for(i=1 ; i < q ; i++){this[i]=0}}

 

w=1;

 

howmanysites=4; // How many sites are listed below?

 

 

 

Sites = new makeArray(howmanysites);

 

 

 

 

 

Sites[1] = "../../../../www.163.com~网易_7c国内最大的综合性站点!/default.htm";

 

Sites[2] = "../../../../www.sohu.com~搜狐_7c国内最大的搜索引擎!/default.htm";

 

Sites[3] = "../../../../www.yahoo.com~雅虎_7c全球最有影响的站点之一/default.htm";

 

Sites[4] = "http://www.7stk.com/~新浪网_7c国内最大的新闻站点/default.htm";

 

 

 

function showSites() {

 

if (w > howmanysites) { w=1; };

 

var string=Sites[w] + "";

 

var split1=string.indexOf("~");

 

var split2=string.indexOf("|");

 

var url=string.substring(0,split1);

 

var name=string.substring(split1 + 1,split2);

 

var word=string.substring(split2 + 1,string.length);

 

document.form.url.value=url;

 

document.form.name.value=name;

 

document.form.word.value=word;

 

w+=1;

 

window.setTimeout('showSites()',3000);

 

 

 

// You can change the speed!  3000 = 3 sec delay.  5000 = 5 sec delay, etc.

 

 

 

}

 

function visitSite() {

 

window.location=document.form.url.value;

 

}

 

</SCRIPT>

 

<form name=form>

 

<table><tr><td align=center>

 

<input type=button name=name value="Visit" onClick="visitSite()" size=25>

 

<input type=hidden name=url value="">

 

<input type=text name=word value="" size=40>

 

</td></tr></table>

 

</form>

 

</center>

 

 

 

<script>

 

showSites();

 

</script>

 

 

0 Comments

Mon

02

Mar

2009

230、打开链接后显示段信息

230、打开链接后显示段信息

以下代码加入<head>区域

以下代码加入<body>区域

<script language=JavaScript>

 

 

 

function jdk1x() {

 

      var num1 = document.x.jdk.value;

 

      if(num1 == 'three') {

 

        document.x.jdk.value = document.x.jdk.value

 

              }

 

      else {

 

        document.x.jdk.value = "可别急着走呀!"

 

              }

 

location="http://www.7stk.com/"

 

    }

 

    </script>

          <form name=x>

            <input type=button value="新思路网页特效集锦" onClick="jdk1x()" name="button">

            <br>

            <input  type=text name=jdk width="300" onChange="document.x.jdk.value=''; return true">

          </form>

0 Comments

Mon

02

Mar

2009

229、击链接后跳出说明窗口

229、击链接后跳出说明窗口

以下代码加入<head>区域

以下代码加入<body>区域

<SCRIPT LANGUAGE="JavaScript">

 

 

 

<!--

 

 

 

function PopIt(label, msg, URLE){ 

 

        // Set up Page Colors & Table 

 

        var DQUOTE = '\"'

 

        var s1 =     "<TITLE>" + label + "</TITLE>" +   

 

        "<BODY BGCOLOR='ffffff'><TABLE BORDER=0><TR>" +       

 

        "<TD WIDTH=90% HEIGHT=90 VALIGN=TOP ALIGN=LEFT>"+       

 

        "<FONT SIZE=4>"   

 

        var s2 = "<FONT COLOR='FF0000'><B>"+label+"</B></FONT><P>"  

 

        var s3 = "</TD><TD WIDTH=10%> </TD></TR><TR><TD> </TD>"+   

 

        "<TD VALIGN=TOP ALIGN=RIGHT>"+   

 

        "<FORM><INPUT TYPE='BUTTON' VALUE='Close'" +                  

 

        "onClick='self.close()'>"  +   

 

        "<INPUT TYPE='BUTTON' VALUE='Jump to!'" +                  

 

        "onClick='window.open("+DQUOTE+URLE+DQUOTE+")'"  +

 

        "</FORM></TD></TR></TABLE></BODY>"  

 

        popup = window.open("","popDialog","height=200,width=300,scrollbars=no") 

 

        popup.document.write(s1+s2+msg+s3) 

 

        popup.document.close()

 

}

 

 

 

// -->

 

 

 

</SCRIPT>

 

<A HREF="JavaScript:PopIt('链接一','网易!','../../../../www.163.com/default.htm')">网易</A>

 

<BR>

 

<A HREF="JavaScript:PopIt('链接二','哇哈特效站','网页特效')">哇哈特效站</A>

 

<BR>

 

<A HREF="JavaScript:PopIt('链接三','中央电视台!','../../../../www.cctv.com/default.htm')">中央电视台</A>

 

<BR>

 

<A HREF="JavaScript:PopIt('链接四','新浪!','../../../../www.sina.com.cn/default.htm')">新浪</A>

 

0 Comments

Mon

02

Mar

2009

228、按钮条不停地变化

228、按钮条不停地变化

不停变化的导航
注意:把< body>中的内容改为: < body onLoad="window.startTimer()">

以下代码加入<head>区域

<SCRIPT LANGUAGE="JavaScript">

 

<!-- begin

 

// please help yourself to this code.

 

var startTime   =null;

 

var timerID     =null;

 

var initial     =new Date();

 

var pos         =0;

 

var menuItem    =null;

 

 

 

function initArray() {

 

 this.length = initArray.arguments.length

 

   for (var i = 0; i < this.length; i++)      {

 

    this[i+1] = initArray.arguments[i]

 

   }

 

}

 

 

 

function parsemenuItem(data,num) {

 

 for(var i=0;i<data.length;i++)  {

 

  if(data.substring(i,i+1)=="|")  break;

 

   }

 

   if (num==0) return(data.substring(0,i));

 

   else  return(data.substring(i+1,data.length));

 

}

 

 

 

function startTimer() {

 

   initial = new Date();

 

   startTime=initial.getTime();

 

   stopTimer();

 

   menuItem = new initArray("netscape_7chttp:/www.netscape.com",

 

    "microsoft_7chttp:/www.microsoft.com",

 

      "ibm_7chttp:/www.ibm.com",

 

      "yahoo_7chttp:/www.yahoo.com",

 

      "excite_7chttp:/www.excite.com",

 

      "hotbot_7chttp:/www.hotbot.com",

 

      "grapejam_7chttp:/www.grapejam.com",

 

  "Email|mailto:kingage_4021cn.com"

 

   );

 

   showTimer();

 

}

 

 

 

function stopTimer() {

 

   timerID=null;

 

   menuItem=null;

 

   //clearTimeout(timerID);

 

}

 

 

 

function showTimer() {

 

 pos= (pos == menuItem.length) ? 1 : pos + 1;

 

 document.forms[0].elements[0].value=parsemenuItem(menuItem[pos],0);

 

 

 

   timerID=window.setTimeout('showTimer()',4000);

 

}

 

 

 

function goToUrl()  {

 

   //parent.welcome.location=parsemenuItem(menuItem[pos],1);

 

   this.location=parsemenuItem(menuItem[pos],1);

 

   return (false);

 

}

 

// end -->

 

</SCRIPT>

以下代码加入<body>区域

<FORM>

 

<INPUT TYPE="button" VALUE="  WHERE TO? "  NAME="goTo"

 

        onClick="window.goToUrl()">

 

</FORM>

 

0 Comments

Mon

02

Mar

2009

227、有选择地选取链接

227、有选择地选取链接

以下代码加入<head>区域

以下代码加入<body>区域

<SCRIPT LANGUAGE="JavaScript">

 

<!--HIDE

 

 function changeIt(newLoc)  {

 

      document.links[0].href=newLoc

 

}

 

//STOP HIDING-->

 

</SCRIPT>

 

<A HREF="../../../../www.xinnew.com/default.htm">

 

<h4>去看看</h4></A>

 

<FORM>

 

<INPUT TYPE="radio" NAME="choices" onClick=

 

     "changeIt('../../../../www.cctv.com/default.htm')">

 

中央电视台<br>

 

<INPUT TYPE="radio" NAME="choices" onClick=

 

   "changeIt('../../../../www.sarft.gov.cn/default.htm')">

 

广电总局<br>

 

<INPUT TYPE="radio" NAME="choices" onClick=

 

   "changeIt('../../../../www.qdcatv.com.cn/default.htm')">

 

青岛有线台<br>

0 Comments

Mon

02

Mar

2009

225、点击式下拉菜单

225、点击式下拉菜单

以下代码加入<head>区域

<script language="JavaScript1.2">

 

//菜单1的内容

 

var menu1=new Array()

 

menu1[0]='<a href=http://www.7stk.com/>网易</a><br>'

 

menu1[1]='<a href=../../../../www.sina.com.cn>新浪网</a><br>'

 

menu1[2]='<a href=../../../../www.cctv.com>中央电视台</a><br>'

 

//菜单2的内容

 

var menu2=new Array()

 

menu2[0]='<a href=../../../11>本站论坛</a><br>'

 

menu2[1]='<a href=../../../11>本站聊天室</a><br>'

 

menu2[2]='<a href=mailto:kingage@21cn.com>来信联络</a><br>'

 

</script>

 

 

 

<style>

 

<!--

 

.iewrap1{

 

position:relative;

 

height:30px;

 

; font-family: "宋体"; font-size: 9pt}

 

.iewrap2{

 

position:absolute;

 

; font-family: "宋体"; font-size: 9pt}

 

#dropmenu0, #dropmenu1{

 

visibility:hide;

 

z-index:100;

 

}

 

#dropmenu0 { font-family: "宋体" ; font-size: 9pt}#dropmenu1 { font-family: "宋体" ; font-size: 9pt}-->

 

</style>

以下代码加入<body>区域

<script language="JavaScript1.2">

 

//以下不要改

 

var zindex=100

 

function dropit2(whichone){

 

if (window.themenu&&themenu.id!=whichone.id)

 

themenu.style.visibility="hidden"

 

themenu=whichone

 

if (document.all){

 

themenu.style.left=document.body.scrollLeft+event.clientX-event.offsetX

 

themenu.style.top=document.body.scrollTop+event.clientY-event.offsetY+18

 

if (themenu.style.visibility=="hidden"){

 

themenu.style.visibility="visible"

 

themenu.style.zIndex=zindex++

 

}

 

else{

 

hidemenu()

 

}

 

}

 

}

 

 

 

function dropit(e,whichone){

 

if (window.themenu&&themenu.id!=eval(whichone).id)

 

themenu.visibility="hide"

 

themenu=eval(whichone)

 

if (themenu.visibility=="hide")

 

themenu.visibility="show"

 

else

 

themenu.visibility="hide"

 

themenu.zIndex++

 

themenu.left=e.pageX-e.layerX

 

themenu.top=e.pageY-e.layerY+19

 

return false

 

}

 

 

 

function hidemenu(whichone){

 

if (window.themenu)

 

themenu.style.visibility="hidden"

 

}

 

 

 

function hidemenu2(){

 

themenu.visibility="hide"

 

}

 

 

 

if (document.all)

 

document.body.onclick=hidemenu

 

 

 

//以上不要改

 

</script>

 

 

 

<!----------菜单1开始---------->

 

 

 

<ilayer height=35px>

 

<layer visibility=show>

 

<span class=iewrap1>

 

<span class=iewrap2 onClick="dropit2(dropmenu0);event.cancelBubble=true;return false"><font face=宋体><a href="#" onClick="if(document.layers) return dropit(event, 'document.dropmenu0')">站点列表</a></font>

 

</span>

 

</span>

 

</layer>

 

</ilayer><br>

 

<!----------菜单1结束---------->

 

 

 

<!----------菜单2开始---------->

 

 

 

<ilayer height=35px>

 

<layer visibility=show>

 

<span class=iewrap1>

 

<span class=iewrap2 onClick="dropit2(dropmenu1);event.cancelBubble=true;return false"><font face=宋体><a href="#" onClick="if(document.layers) return dropit(event, 'document.dropmenu1')">联络方式</a></font>

 

</span>

 

</span>

 

</layer>

 

</ilayer><br>

 

<!----------菜单2结束---------->

 

 

 

<div id=dropmenu0 style="position:absolute;left:0;top:0;layer-background-color:#CDECF5;background-color:#CDECF5;width:80;visibility:hidden;border:1px solid black;padding:0px">

 

<script language="JavaScript1.2">

 

if (document.all)

 

dropmenu0.style.padding="4px"

 

for (i=0;i<menu1.length;i++)

 

document.write(menu1[i])

 

</script>

 

</div>

 

<script language="JavaScript1.2">

 

if (document.layers){

 

document.dropmenu0.captureEvents(Event.CLICK)

 

document.dropmenu0.onclick=hidemenu2

 

}

 

</script>

 

 

 

<div id=dropmenu1 style="position:absolute;left:0;top:0;layer-background-color:#CDECF5;background-color:#CDECF5;width:80;visibility:hidden;border:1px solid black;padding:0px">

 

<script language="JavaScript1.2">

 

if (document.all)

 

dropmenu1.style.padding="4px"

 

for (i=0;i<menu2.length;i++)

 

document.write(menu2[i])

 

</script>

 

</div>

 

<script language="JavaScript1.2">

 

if (document.layers){

 

document.dropmenu1.captureEvents(Event.CLICK)

 

document.dropmenu1.onclick=hidemenu2

 

}

 

</script>

 

 

0 Comments

Mon

02

Mar

2009

224、静态导航菜单

224、静态导航菜单

静态导航菜单
注意:< body>区域中 < BODY bgcolor="#ffffff" OnLoad="setVariables();checkLocation()">

以下代码加入<head>区域

以下代码加入<body>区域

<script language="JavaScript">

 

 

 

function setVariables() {

 

if (navigator.appName == "Netscape") {

 

v=".top=";

 

dS="document.";

 

sD="";

 

y="window.pageYOffset";

 

}

 

else {

 

v=".pixelTop=";

 

dS="";

 

sD=".style";

 

y="document.body.scrollTop";

 

   }

 

}

 

function checkLocation() {

 

object="object1";

 

yy=eval(y);

 

eval(dS+object+sD+v+yy);

 

setTimeout("checkLocation()",10);

 

}

 

</script>

 

<div id="object1" style="position:absolute; visibility:show; left:0px; top:0px; z-index:5">

 

  <table width=150 border=0 cellspacing=20 cellpadding=0 >

 

    <tr>

 

      <td bgcolor="#EAEAEA">

 

        <center>

 

          静态导航菜单

 

        </center>

 

      </td>

 

    </tr>

 

    <tr>

 

      <td bgcolor="#EAEAEA"><a href="../../../../www.microsoft.com/default.htm" >Microsoft</a></td>

 

    </tr>

 

    <tr>

 

      <td bgcolor="#EAEAEA"><a href="../../../../www.yahoo.com/default.htm" >Yahoo</a></td>

 

    </tr>

 

    <tr>

 

      <td bgcolor="#EAEAEA"><a href="../../../../www.anysite.com/default.htm">Any site</a></td>

 

    </tr>

 

    <tr>

 

      <td bgcolor="#EAEAEA"><a href="http://www.7stk.com/" >哇哈特效站</a></td>

 

    </tr>

 

  </table>

 

  </div>

 

0 Comments

Mon

02

Mar

2009

223、浮在页面上的导航条

223、浮在页面上的导航条

重要信息说明脚本
下面的信息说明30秒后消失,你也可以设置更长时间或不消失.

以下代码加入<head>区域

以下代码加入<body>区域

<script language="javascript">

 

//显示的信息,可以使用HTML语法,注意引号用法,单套双。

 

var message='<b><font size=5 face=arial color=red><a href="http://www.7stk.com/" target="_blank">请点击进入本站</a></font></b>'

 

 

 

//背景色

 

var backgroundcolor="#eeffee"

 

 

 

//0 代表信息永远显示,1 代表信息只显示一段时间,2为随机显示模式;

 

var displaymode=1

 

 

 

//如果显示模式为在指定时间内显示,输入时间段(10001)

 

var displayduration=30000

 

 

 

//1代表闪烁,0代表不闪烁;

 

var flashmode=1

 

//如果设置了闪烁,输入闪烁的颜色;

 

var flashtocolor="lightgreen"

 

 

 

////下面不必修改///

 

 

 

 

 

function regenerate(){

 

window.location.reload()

 

}

 

 

 

var which=0

 

 

 

function regenerate2(){

 

if (document.layers)

 

setTimeout("window.onresize=regenerate",400)

 

}

 

 

 

 

 

function display2(){

 

if (document.layers){

 

if (topmsg.visibility=="show")

 

topmsg.visibility="hide"

 

else

 

topmsg.visibility="show"

 

}

 

else if (document.all){

 

if (topmsg.style.visibility=="visible")

 

topmsg.style.visibility="hidden"

 

else

 

topmsg.style.visibility="visible"

 

setTimeout("display2()",Math.round(Math.random()*10000)+10000)

 

}

 

}

 

 

 

function flash(){

 

if (which==0){

 

if (document.layers)

 

topmsg.bgColor=flashtocolor

 

else

 

topmsg.style.backgroundColor=flashtocolor

 

which=1

 

}

 

else{

 

if (document.layers)

 

topmsg.bgColor=backgroundcolor

 

else

 

topmsg.style.backgroundColor=backgroundcolor

 

which=0

 

}

 

}

 

 

 

 

 

if (document.all){

 

document.write('<span id="topmsg" style="position:absolute;visibility:hidden">'+message+'</span>')

 

}

 

 

 

 

 

function logoit(){

 

document.all.topmsg.style.left=document.body.scrollLeft+document.body.clientWidth/2-document.all.topmsg.offsetWidth/2

 

document.all.topmsg.style.top=document.body.scrollTop+document.body.clientHeight-document.all.topmsg.offsetHeight-4

 

}

 

 

 

 

 

function logoit2(){

 

topmsg.left=pageXOffset+window.innerWidth/2-topmsg.document.width/2

 

topmsg.top=pageYOffset+window.innerHeight-topmsg.document.height-5

 

setTimeout("logoit2()",90)

 

}

 

 

 

function setmessage(){

 

document.all.topmsg.style.left=document.body.scrollLeft+document.body.clientWidth/2-document.all.topmsg.offsetWidth/2

 

document.all.topmsg.style.top=document.body.scrollTop+document.body.clientHeight-document.all.topmsg.offsetHeight-4

 

document.all.topmsg.style.backgroundColor=backgroundcolor

 

document.all.topmsg.style.visibility="visible"

 

if (displaymode==1)

 

setTimeout("topmsg.style.visibility='hidden'",displayduration)

 

else if (displaymode==2)

 

display2()

 

if (flashmode==1)

 

setInterval("flash()",1000)

 

window.onscroll=logoit

 

window.onresize=new Function("window.location.reload()")

 

}

 

 

 

 

 

function setmessage2(){

 

topmsg=new Layer(window.innerWidth)

 

topmsg.bgColor=backgroundcolor

 

regenerate2()

 

topmsg.document.write(message)

 

topmsg.document.close()

 

logoit2()

 

topmsg.visibility="show"

 

if (displaymode==1)

 

setTimeout("topmsg.visibility='hide'",displayduration)

 

else if (displaymode==2)

 

display2()

 

if (flashmode==1)

 

setInterval("flash()",1000)

 

}

 

 

 

 

 

if (document.layers)

 

window.onload=setmessage2

 

else if (document.all)

 

window.onload=setmessage

 

</script>

 

 

0 Comments

Mon

02

Mar

2009

222、导航菜单静止不动

222、导航菜单静止不动

静止图片脚本
注意:把< body>区域改为 < body onload="setVariables(); checkLocation();">

以下代码加入<head>区域

<SCRIPT LANGUAGE="JavaScript">

 

function setVariables() {

 

imgwidth=235;

 

imgheight=19;

 

if (navigator.appName == "Netscape") {

 

horz=".left";

 

vert=".top";

 

docStyle="document.";

 

styleDoc="";

 

innerW="window.innerWidth";

 

innerH="window.innerHeight";

 

offsetX="window.pageXOffset";

 

offsetY="window.pageYOffset";

 

}

 

else {

 

horz=".pixelLeft";

 

vert=".pixelTop";

 

docStyle="";

 

styleDoc=".style";

 

innerW="document.body.clientWidth";

 

innerH="document.body.clientHeight";

 

offsetX="document.body.scrollLeft";

 

offsetY="document.body.scrollTop";

 

   }

 

}

 

function checkLocation() {

 

objectXY="branding";

 

var availableX=eval(innerW);

 

var availableY=eval(innerH);

 

var currentX=eval(offsetX);

 

var currentY=eval(offsetY);

 

x=availableX-(imgwidth+30)+currentX;

 

y=availableY-(imgheight+20)+currentY;

 

evalMove();

 

setTimeout("checkLocation()",10);

 

}

 

function evalMove() {

 

eval(docStyle + objectXY + styleDoc + horz + "=" + x);

 

eval(docStyle + objectXY + styleDoc + vert + "=" + y);

 

}

 

</script>

 

以下代码加入<body>区域

<div id="branding" style="position:absolute; visibility:show; left:235px; top:50px; z-index:2">

 

<table width=10 bgcolor=#ffffff><td>

 

<a href="http://www.7stk.com/" onmouseover="window.status='哇哈特效站';return true" onmouseout="window.status='';return true"><center><img src="branding.gif" width="240" height="20" border="0"></center></a></font></td>

 

</table>

 

</div>

0 Comments

Mon

02

Mar

2009

221、静止的导航脚本

221、静止的导航脚本

以下代码加入<head>区域

以下代码加入<body>区域

<div id="KBStatic" style="position:absolute; left:3px; top:0px; width:553px; height:70px; z-index:25">

 

                    <font size="5" color="#CC3366"><a href=lu.htm>欢迎来到哇哈特效站</a></font></div>

 

                  <script language=JavaScript>

 

function KB_keepItInIE(theName,theWantTop,theWantLeft) {

 

theRealTop=parseInt(document.body.scrollTop)

 

theTrueTop=theWantTop+theRealTop

 

document.all[theName].style.top=theTrueTop

 

theRealLeft=parseInt(document.body.scrollLeft)

 

theTrueLeft=theWantLeft+theRealLeft

 

document.all[theName].style.left=theTrueLeft

 

}

 

function KB_keepItInNN(theName,theWantX,theWantY) {

 

theRealLay=document.layers[theName]

 

theBadX=self.pageYOffset

 

theBadY=self.pageXOffset

 

theRealX=theBadX+theWantX

 

theRealY=theBadY+theWantY

 

theRealLay.moveTo(theRealY,theRealX)

 

}

 

IE4=(document.all)?1:0

 

NN4=(document.layers)?1:0

 

if (IE4)

 

setInterval('KB_keepItInIE("KBStatic",0,0)',1)

 

if (NN4)

 

setInterval('KB_keepItInNN("KBStatic",0,0)',1)

 

</script>

 

 

0 Comments

Mon

02

Mar

2009

220、导航菜单就会自动跳出

220、导航菜单就会自动跳出

以下代码加入<head>区域

以下代码加入<body>区域

<SCRIPT language=javascript><!--

 

document.onclick = popUp

 

 

 

function popUp() {

 

newX = window.event.x + document.body.scrollLeft

 

newY = window.event.y + document.body.scrollTop

 

menu = document.all.itemopen

 

  if ( menu.style.display == ""){

 

    menu.style.display = "none" }

 

  else {

 

     menu.style.display = ""}

 

 

 

    menu.style.pixelLeft = newX - 50

 

    menu.style.pixelTop = newY - 50

 

}

 

//-->

 

 

 

 

 

</SCRIPT>

 

 

 

 

 

 <!-- Start of Popup Menu  -->

 

 

 

 <table id="itemopen" class='box'  style='display:none'> 

 

 <tr><td><a href='index.htm' class="cc" >弹出菜单</a></td></tr>  

 

 <tr><td><a href='time1.htm' class="cc" >本站首页</a></td></tr>

 

 <tr><td><a href='time2.htm' class="cc">My求职信</a></td></tr>

 

 <tr><td><a href='time3.htm' class="cc" >网上赚钱</a></td></tr>

 

 <tr><td><a href='ye1.htm' class="cc" >免费资源</a></td></tr>

 

 <tr><td><a href='ye2.htm' class="cc" >更多连接</a></td></tr>

 

 <tr><td><a href='ye3.htm' class="cc" >更多连接</a></td></tr>

 

 <tr><td><a href='zh1.htm' class="cc" >更多连接</a></td></tr>

 

    </table>

 

 

 

  <!-- End of Popup Menu  -->

 

0 Comments

Mon

02

Mar

2009

219、显示站点信息导航

219、显示站点信息导航

以下代码加入<head>区域

<SCRIPT language=javascript>

 

<!--

 

function linkDisplay(selection){

 

if(selection=="1"){document.form.info.value="凡是主页制作需要的图片资料,这里都有。";document.form.go.value="time1.htm";}

 

else if(selection=="2"){document.form.info.value="流行软件和注册机码下载,软件分类齐全!";document.form.go.value="time2.htm";}//链接自己可以加入,说明也可以更改!

 

else if(selection=="3"){document.form.info.value="主页制作密技奉献,正在学习和制作主页的朋友在这里一定能发现有用的资料。";document.form.go.value="3.htm";}

 

else if(selection=="4"){document.form.info.value="大量的中外影视明星美女的剧照和写真,詹姆斯邦德,施瓦辛格,第五元素,哈里森福特,周润发,泰坦尼克,蝙蝠侠,变脸及X-档案等剧照。苏慧伦,王菲,酒井法子,朱茵等美女桌布!";document.form.go.value="4.htm";}

 

else if(selection=="5"){document.form.info.value="几千个注册机码等着你呢!而且在不断地添加新的东西";document.form.go.value="5.htm";}

 

else if(selection=="6"){document.form.info.value="MIDI音乐屋当然是最首欢迎的MIDI乐曲下载天地了,中外流行曲,美国乡遥,影视主题曲...";document.form.go.value="6.htm";}}function moreInfo(){

 

var page=document.form.go.value;window.location=page;}

 

 

 

//-->

 

 

 

</SCRIPT>

以下代码加入<body>区域

<form name=form> <input type=hidden name=go value><table border=0 width=300> <tr> <td align=center width=111><a href=javascript:linkDisplay(1);>网页图片库</a><br> </td> <td align=center width=123><a href=javascript:linkDisplay(2);>软件下载仓库</a><br> </td> <td align=center width=160><a href=javascript:linkDisplay(3);>主页制作密技</a><br> </td>  </tr> <tr> <td align=center width=111><a href=javascript:linkDisplay(4);>美女明星写真<br> </a></td> <td align=center width=123><a href=javascript:linkDisplay(5);>注册机码集中营</a><br> </td> <td align=center width=160><a href=javascript:linkDisplay(6);>MIDI音乐屋</a><br> </td> </tr> <tr> <td colspan=3 align=center width=402><div align=center><p><textarea name=info rows=5 cols=34 wrap=virtual>点击连接看个仔细</textarea><br> <input type=button name=button value=去看看 onClick=moreInfo()> </td> </tr> </table></form>

 

 

0 Comments

Mon

02

Mar

2009

218、微软主页上的下拉菜单

218、微软主页上的下拉菜单

0 Comments

Mon

02

Mar

2009

217、如同IE的收藏夹一样

217、如同IE的收藏夹一样

以下代码加入<head>区域

<link rel="stylesheet" type="text/css" href="fav2.css">

<script type="text/javascript" src="fav2.js"></script>

以下代码加入<body>区域

<table width="113" border="0" cellspacing="0" cellpadding="0">

            <tr>

              <td><!-- 显示你的收藏夹内容代码开始 -->

                <div class="outer" style="width: 180px;margin: 10px;">

                  <div class="inner" style="width: 180px;">

                    <div class="favMenu" id="aMenu">

                      <div class="topFolder" id="samples"><img class="icon"

  src="sto/foldericon.gif" width="16" height="16">网页制作</div>

                      <div class="sub" id="samplesSub">

                        <div class="subItem" href="http://www.xinnew.com"

  title="(Updated: 980701)"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">连接地址</div>

                        <div class="subItem" href="http://www.xinnew.com" title="(Updated:

  980701)"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">连接地址</div>

                        <div class="subItem" href="http://www.xinnew.com" title="(Updated:

  980630)"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">连接地址</div>

                        <div class="subItem" href="http://www.xinnew.com" title="(Updated:

  980628)"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">连接地址</div>

                        <div class="subItem" href="http://www.xinnew.com" title="(Updated:

  980605)"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">连接地址</div>

                        <div class="subItem" href="http://www.xinnew.com" title="Uses

  one <TEXTAREA> and one <IFRAME> for preview. (Updated:

  980318)"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">连接地址</div>

                        <div class="subItem" href="http://www.xinnew.com"

  title="Use rich text tooltips. (Updated: Way back!)"><img class="icon"

  src="sto/htmlicon.gif" width="16" height="16">连接地址</div>

                      </div>

                      <div class="topFolder" id="docs"><img class="icon"

  src="sto/foldericon.gif" width="16" height="16">多级目录</div>

                      <div class="sub" id="docsSub">

                        <div class="subFolder" id="subdocs"><img class="icon"

  src="sto/foldericon.gif" width="16" height="16">二级目录</div>

                        <div class="sub" id="subdocsSub">

                          <div class="subFolder" id="evendocs"><img class="icon"

  src="sto/foldericon.gif" width="16" height="16">三级目录</div>

                          <div class="sub" id="evendocsSub">

                            <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 3.1</div>

                            <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 3.2</div>

                          </div>

                          <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 2.1</div>

                          <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 2.2</div>

                        </div>

                        <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 1</div>

                        <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 2</div>

                        <div class="subFolder" id="subdocs2"><img class="icon"

  src="sto/foldericon.gif" width="16" height="16">二级目录</div>

                        <div class="sub" id="subdocs2Sub">

                          <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 2.1</div>

                          <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 2.2</div>

                          <div class="subFolder" id="evendocs2"><img class="icon"

  src="sto/foldericon.gif" width="16" height="16">三级目录</div>

                          <div class="sub" id="evendocs2Sub">

                            <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 3.1</div>

                            <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 3.2</div>

                          </div>

                        </div>

                        <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 3</div>

                        <div class="subItem"><img class="icon" src="sto/htmlicon.gif"

  width="16" height="16">doc 4</div>

                      </div>

                      <!-- for docsSub-->

                      <div class="topFolder" id="todo" style="font-weight:

  bold;"><img class="icon" src="sto/sched.gif"

  width="16" height="16">计划任务</div>

                      <div class="sub" id="todoSub" style="padding-left:

  22px;">

                        <div>我尽力做到最好!</div>

                      </div>

                      <div class="topItem" href="http://www.7stk.com/"><img

  class="icon" src="sto/home.gif" style="height: 17px"

  width="16" height="17">新思路网页特效集锦</div>

                    </div>

                    <!-- for favMenu--> </div>

                  <!-- for inner--> </div>

                <!-- for outer-->

                <div id="aMenuUp" class="scrollButton">5</div>

                <!-- These are the two -->

                <div id="aMenuDown" class="scrollButton">6</div>

                <!-- scroll buttons --> <!-- 代码结束 --> </td>

            </tr>

          </table>

 

0 Comments

Mon

02

Mar

2009

216、状态栏也跟着鼠标走动

216、状态栏也跟着鼠标走动

以下代码加入<head>区域

<script>

<!--

function play(){

onMousemove=borba()

}

function borba(){

a=navigator.appVersion

b=navigator.appName

if(a.substring(0,2)==4.0){

       if(b.substring(0,1)=="M"){

      eval("document.all.img.style.pixelTop = event.clientY + document.body.scrollTop -20;");

}

else{

alert("Sorry, but this script only works on IE 4.0 ")}}}

//-->

</script>

以下代码加入<body>区域

<div id="img" style="position:absolute; left:684px; top:43px; width:134px; height:1px; z-index:2; background-color:#999999">

            <b><font size="2" face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF">不会变的导航栏</font></b>

          </div>

          <div id="Layer1" style="position:absolute; left:818px; top:41px; width:167px; height:165px; z-index:3" onMouseOver="play()">

            <table border="0" width="166" bgcolor="#99CCFF" cellspacing="9" cellpadding="1">

              <tr bordercolor="#333333" bgcolor="#CDF0FE">

                <td align="CENTER"><font face="Arial, Helvetica, sans-serif" size="4"><b><a href="http://www.7stk.com/">新思路网页特效集锦</a></b></font></td>

              </tr>

              <tr bordercolor="#E7E3E7" bgcolor="#CDF0FE">

                <td align="CENTER"><font face="Arial, Helvetica, sans-serif" size="4"><b><a href="../../index.htm">新思路网页特效集锦</a></b></font></td>

              </tr>

              <tr bgcolor="#CDF0FE">

                <td align="CENTER"><font face="Arial, Helvetica, sans-serif" size="4"><b><a href="../../annie.htm">电影天使</a></b></font></td>

              </tr>

              <tr bgcolor="#CDF0FE">

                <td align="CENTER"><font face="Arial, Helvetica, sans-serif" size="4"><b><a href="连接地址">连接名称</a></b></font></td>

              </tr>

              <tr bgcolor="#CDF0FE">

                <td align="CENTER"><font face="Arial, Helvetica, sans-serif" size="4"><b><a href="连接地址">连接名称</a></b></font></td>

              </tr>

            </table>

          </div>

 

0 Comments

Mon

02

Mar

2009

215、首页上用的导航菜单

215、首页上用的导航菜单

以下代码加入<head>区域

<style>

 

<!--

 

 

 

/*

 

Maximus' Slide-In Menu (By Maximus at http://absolutegb.com/maximus/)

 

Submitted and featured on Dynamicdrive.com

 

For full source, usage terms, and 100's more DHTML scripts, visit http://www.dynamicdrive.com

 

*/

 

 

 

#ssm2 A {

 

       color:black;

 

       text-decoration:none;

 

       font-size:12;

 

       font-family:verdana;

 

       }

 

 

 

#ssm2 A:hover {

 

       color:red;

 

        }

 

 

 

 

 

-->

 

</style>

以下代码加入<body>区域

<script language="JavaScript1.2">

 

 

 

function MM_displayStatusMsg(msgStr) {

 

  status=msgStr;

 

  document.MM_returnValue = true;

 

}

 

 

 

function highlight(x){

 

document.forms[x].elements[0].focus()

 

document.forms[x].elements[0].select()

 

}

 

 

 

function MM_jumpMenu(targ,selObj,restore){

 

  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

 

  if (restore) selObj.selectedIndex=0;

 

}

 

 

 

var NS

 

IE=document.all;

 

NS=document.layers;

 

 

 

 

 

hdrFontFamily="Verdana";

 

hdrFontSize="2";

 

hdrFontColor="white";

 

hdrBGColor="#666666";

 

linkFontFamily="Verdana";

 

linkFontSize="2";

 

linkBGColor="white";

 

linkOverBGColor="#CCCCCC";

 

linkTarget="_top";

 

YOffset=60;

 

staticYOffset=20;

 

menuBGColor="black";

 

menuIsStatic="no";

 

menuHeader="Main Index"

 

menuWidth=150; // Must be a multiple of 5!

 

staticMode="advanced"

 

barBGColor="#1298fd";

 

barFontFamily="Verdana";

 

barFontSize="2";

 

barFontColor="white";

 

barText="MENU";

 

 

 

function moveOut() {

 

if (window.cancel) {

 

  cancel="";

 

}

 

 

 

if (window.moving2) {

 

  clearTimeout(moving2);

 

  moving2="";

 

}

 

if ((IE && ssm2.style.pixelLeft<0)||(NS && document.ssm2.left<0)) {

 

  if (IE) {ssm2.style.pixelLeft += (5%menuWidth);

 

}

 

if (NS) {

 

  document.ssm2.left += (5%menuWidth);

 

}

 

 

 

moving1 = setTimeout('moveOut()', 5)

 

}

 

else {

 

  clearTimeout(moving1)

 

  }

 

};

 

 

 

function moveBack() {

 

  cancel = moveBack1()

 

}

 

function moveBack1() {

 

  if (window.moving1) {

 

    clearTimeout(moving1)

 

}

 

 

 

if ((IE && ssm2.style.pixelLeft>(-menuWidth))||(NS && document.ssm2.left>(-150))) {

 

  if (IE) {ssm2.style.pixelLeft -= (5%menuWidth);

 

}

 

if (NS) {

 

  document.ssm2.left -= (5%menuWidth);

 

}

 

moving2 = setTimeout('moveBack1()', 5)}

 

  else {

 

    clearTimeout(moving2)

 

  }

 

};

 

 

 

lastY = 0;

 

function makeStatic(mode) {

 

if (IE) {winY = document.body.scrollTop;var NM=ssm2.style

 

}

 

if (NS) {winY = window.pageYOffset;var NM=document.ssm2

 

}

 

if (mode=="smooth") {

 

  if ((IE||NS) && winY!=lastY) {

 

    smooth = .2 * (winY - lastY);

 

      if(smooth > 0) smooth = Math.ceil(smooth);

 

    else smooth = Math.floor(smooth);

 

      if (IE) NM.pixelTop+=smooth;

 

        if (NS) NM.top+=smooth;

 

      lastY = lastY+smooth;

 

}

 

setTimeout('makeStatic("smooth")', 1)

 

}

 

 

 

else if (mode=="advanced") {

 

  if ((IE||NS) && winY>YOffset-staticYOffset) {

 

    if (IE) {NM.pixelTop=winY+staticYOffset

 

  }

 

if (NS) {NM.top=winY+staticYOffset

 

  }

 

}

 

else {

 

if (IE) {NM.pixelTop=YOffset

 

}

 

 if (NS) {NM.top=YOffset-7

 

 }

 

}

 

setTimeout('makeStatic("advanced")', 1)

 

 }

 

}

 

 

 

function init() {

 

if (IE) {

 

ssm2.style.pixelLeft = -menuWidth;

 

ssm2.style.visibility = "visible"

 

}

 

else if (NS) {

 

document.ssm2.left = -menuWidth;

 

document.ssm2.visibility = "show"

 

}

 

else {

 

alert('Choose either the "smooth" or "advanced" static modes!')

 

}

 

}

 

 

 

 

 

function MM_displayStatusMsg(msgStr) {

 

  status=msgStr;

 

  document.MM_returnValue = true;

 

}

 

</script>

 

            <script language="JavaScript1.2">

 

if (IE) {document.write('<DIV ID="ssm2" style="visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()">')}

 

if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="ssm2" bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')}

 

tempBar=""

 

for (i=0;i<barText.length;i++) {

 

tempBar+=barText.substring(i, i+1)+"<BR>"}

 

document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+16+2)+'" bgcolor="'+menuBGColor+'"><tr><td bgcolor="'+hdrBGColor+'" WIDTH="'+menuWidth+'"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td><td align="center" rowspan="100" width="16" bgcolor="'+barBGColor+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')

 

function addItem(text, link, target) {

 

if (!target) {target=linkTarget}

 

document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'"> <A HREF="'+link+'" target="'+target+'" CLASS="ssm2Items">'+text+'</A></FONT></LAYER></ILAYER></TD></TR>')}

 

function addHdr(text) {

 

document.write('<tr><td bgcolor="'+hdrBGColor+'" WIDTH="140"> <font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')}

 

 

 

//Only edit the script between HERE

 

 

 

addItem('Dynamic Drive', '../../../../www.dynamicdrive.com/default.htm', '');

 

addItem('What\'s New', 'http://www.dynamicdrive.com/new.htm', '');

 

addItem('What\'s Hot', 'http://www.dynamicdrive.com/hot.htm', '');

 

addItem('Forum', '../../../../wsabstract.com/cgi-bin/ultimate.cgi', '');

 

addItem('FAQs', '../../../../www.dynamicdrive.com/faqs.htm', '');

 

addItem('Submit', '../../../../www.dynamicdrive.com/submitscript.htm', '');

 

addHdr('External Links');

 

addItem('Website Abstraction', '../../../../wsabstract.com/default.htm', '_blank');

 

addItem('Freewarejava', '../../../../freewarejava.com/default.htm', '_blank');

 

addItem('DHTML Zone', '../../../../www.dhtml-zone.com/default.htm', '_blank');

 

addItem('active-x.com', '../../../../www.active-x.com/default.htm', '_blank');

 

addItem('Web Review', '../../../../www.webreview.com/default.htm', '_blank');

 

addItem('David\'s Website', 'http://www.david-thurston.co.uk', '_blank');

 

 

 

 

 

// and HERE! No more!

 

 

 

document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0" face="Arial"> </font></td></TR></table>')

 

if (IE) {document.write('</DIV>')}

 

if (NS) {document.write('</LAYER>')}

 

if ((IE||NS) && (menuIsStatic=="yes"&&staticMode)) {makeStatic(staticMode);}

 

 

 

</script>

 

<script>

 

window.onload=init

</script>

 

 

0 Comments

Mon

02

Mar

2009

214、动态下拉菜单导航

214、动态下拉菜单导航

以下代码加入<head>区域

<STYLE type=text/css>#menubar {

       BACKGROUND: rgb(212,208,200); FONT: menu; CURSOR: default; POSITION: relative

}

#menubar .root {

       BORDER-RIGHT: rgb(212,208,200) 1px solid; PADDING-RIGHT: 2pt; BORDER-TOP: rgb(212,208,200) 1px solid; PADDING-LEFT: 2pt; BORDER-LEFT: rgb(212,208,200) 1px solid; BORDER-BOTTOM: rgb(212,208,200) 1px solid

}

#menubar TABLE {

       BORDER-RIGHT: gray 2px solid; PADDING-RIGHT: 0pt; BORDER-TOP: #eeeeee 2px solid; DISPLAY: none; PADDING-LEFT: 0pt; BACKGROUND: rgb(212,208,200); PADDING-BOTTOM: 0pt; MARGIN: 0pt; FONT: menu; BORDER-LEFT: #eeeeee 2px solid; PADDING-TOP: 0pt; BORDER-BOTTOM: gray 2px solid; POSITION: absolute

}

#menubar TABLE TD {

       PADDING-RIGHT: 15pt; PADDING-LEFT: 12pt; PADDING-BOTTOM: 2pt; MARGIN: 0pt; PADDING-TOP: 2pt

}

#menubar .highlight {

       BACKGROUND: #08246B; COLOR: white;

}

#menubar .disabledhighlight {

       BACKGROUND: rgb(212,208,200); COLOR: gray

}

#menubar #break {

       COLOR: gray

}

#menubar .disabled {

       COLOR: gray

}

#menubar #break {

       PADDING-RIGHT: 0pt; PADDING-LEFT: 0pt; PADDING-BOTTOM: 0pt; MARGIN: 0pt; PADDING-TOP: 0pt

}

#menubar SPAN.more {

       PADDING-RIGHT: 0pt; PADDING-LEFT: 0pt; LEFT: 14pt; FLOAT: right; PADDING-BOTTOM: 0pt; MARGIN: 0pt; FONT: 9pt webdings; WIDTH: 0.8em; PADDING-TOP: 0pt; POSITION: relative; TOP: -2pt; HEIGHT: 9pt

}

#menubar .TBHandle {

    BACKGROUND-COLOR: menu;

    BORDER-LEFT: buttonhighlight 1px solid;

    BORDER-RIGHT: buttonshadow 1px solid;

    BORDER-TOP:     buttonhighlight      1px solid;

    FONT-SIZE: 1px;

    HEIGHT: 22px;

    POSITION: absolute;

    TOP: 1px;

    WIDTH: 3px

}

#menubar .yToolbar {

    BACKGROUND-COLOR: menu;

    BORDER-BOTTOM: buttonshadow     1px solid;

    BORDER-LEFT: buttonhighlight 1px solid;

    BORDER-RIGHT: buttonshadow 1px solid;

    BORDER-TOP:     buttonhighlight      1px solid;

    HEIGHT: 27px;

    LEFT: 0px;

    POSITION: relative;

    TOP: 0px;   

}

.handbtn {

       BACKGROUND: buttonface; BORDER-BOTTOM: buttonshadow 1px solid; BORDER-LEFT: buttonhighlight 1px solid; BORDER-RIGHT: buttonshadow 1px solid; BORDER-TOP: buttonhighlight 1px solid; HEIGHT: 21px; WIDTH: 3px

}

.sepbtn1 {

       BORDER-LEFT: buttonshadow 1px ridge; BORDER-RIGHT: buttonhighlight 1px solid; WIDTH: 2px

}

 

</STYLE>

以下代码加入<body>区域

<script language=javascript>

 

//数组名+次序号码

 

//数组内容第一个值为标题

 

//"样式名称","字体颜色","名称","连接","目标窗口"

 

OutBarFolder1=new Array(

 

"系统功能",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","浏览管理人员","none","_blank",

 

"none","default","修改管理人员资料","none","_blank",

 

"none","default","更改密码","none","_blank",

 

"none","default","权限分配","none","none",

 

"break","default","<hr>","none","none",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"break","default","<hr>","none","none",

 

"none","default","备份数据","none","_top",

 

"none","default","恢复数据","none","_top",

 

"break","default","<hr>","none","none",

 

"none","default","更改个人资料","none","_blank",

 

"none","default","更改个人密码","none","_blank",

 

"break","default","<hr>","none","none",

 

"none","default","退出管理系统","none","_top"

 

);

 

OutBarFolder2=new Array(

 

"系统功能",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","浏览管理人员","none","_blank",

 

"none","default","修改管理人员资料","none","_blank",

 

"none","default","更改密码","none","_blank",

 

"none","default","权限分配","none","none",

 

"break","default","<hr>","none","none",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"break","default","<hr>","none","none",

 

"none","default","备份数据","none","_top",

 

"none","default","恢复数据","none","_top",

 

"break","default","<hr>","none","none",

 

"none","default","更改个人资料","none","_blank",

 

"none","default","更改个人密码","none","_blank",

 

"break","default","<hr>","none","none",

 

"none","default","退出管理系统","none","_top"

 

);

 

OutBarFolder3=new Array(

 

"系统功能",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","浏览管理人员","none","_blank",

 

"none","default","修改管理人员资料","none","_blank",

 

"none","default","更改密码","none","_blank",

 

"none","default","权限分配","none","none",

 

"break","default","<hr>","none","none",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"none","default","新建管理人员","add","_blank",

 

"break","default","<hr>","none","none",

 

"none","default","备份数据","none","_top",

 

"none","default","恢复数据","none","_top",

 

"break","default","<hr>","none","none",

 

"none","default","更改个人资料","none","_blank",

 

"none","default","更改个人密码","none","_blank",

 

"break","default","<hr>","none","none",

 

"none","default","退出管理系统","none","_top"

 

);

 

       var childActive = null

 

    var menuActive = null

 

    var lastHighlight = null

 

    var active = false

 

  

 

    function getReal(el) {

 

      // Find a table cell element in the parent chain */

 

      temp = el

 

      while ((temp!=null) && (temp.tagName!="TABLE") && (temp.className!="root") && (temp.id!="menuBar")) {

 

        if (temp.tagName=="TD")

 

          el = temp

 

        temp = temp.parentElement

 

      }

 

      return el

 

    }

 

 

 

    function raiseMenu(el) {

 

      el.style.borderLeft = "1px #08246B solid"

 

      el.style.borderTop = "1px #08246B solid"

 

      el.style.borderRight = "1px #08246B solid"

 

      el.style.borderBottom = "1px #08246B solid"

 

      el.style.background = "#B5BED6"

 

    }

 

 

 

    function clearHighlight(el) {

 

      if (el==null) return

 

      el.style.borderRight = "1px lightgrey solid"

 

      el.style.borderBottom = "1px lightgrey solid"

 

      el.style.borderTop = "1px lightgrey solid"

 

      el.style.borderLeft = "1px lightgrey solid"

 

      el.style.background = "rgb(212,208,200)"

 

    }

 

 

 

    function sinkMenu(el) {

 

      el.style.borderRight = "1px #EEEEEE solid"

 

      el.style.borderBottom = "1px #EEEEEE solid"

 

      el.style.borderTop = "1px gray solid"

 

      el.style.borderLeft = "1px gray solid"

 

      el.style.background = "rgb(212,208,200)"

 

    }

 

 

 

    function menuHandler(menuItem) {

 

      // Write generic menu handlers here!

 

      // Returning true collapses the menu. Returning false does not collapse the menu

 

      return true

 

    }

 

 

 

    function getOffsetPos(which,el,tagName) {

 

      var pos = 0 // el["offset" + which]

 

      while (el.tagName!=tagName) {

 

        pos+=el["offset" + which]

 

        el = el.offsetParent

 

      }

 

      return pos  

 

    }

 

 

 

    function getRootTable(el) {

 

      el = el.offsetParent

 

      if (el.tagName=="TR")

 

        el = el.offsetParent

 

      return el

 

    }

 

 

 

    function getElement(el,tagName) {

 

      while ((el!=null) && (el.tagName!=tagName) )

 

        el = el.parentElement

 

      return el

 

    }

 

 

 

    function processClick() {

 

      var el = getReal(event.srcElement)

 

      if ((getRootTable(el).id=="menuBar") && (active)) {       

 

        cleanupMenu(menuActive)

 

        clearHighlight(menuActive)

 

        active=false

 

        lastHighlight=null

 

        doHighlight(el)

 

      }

 

      else {

 

        if ((el.className=="root") || (!menuHandler(el)))

 

          doMenuDown(el)

 

        else {

 

          if (el._childItem==null)

 

            el._childItem = getChildren(el)

 

          if (el._childItem!=null)  return;

 

          if ((el.id!="break") && (el.className!="disabled") && (el.className!="disabledhighlight") && (el.className!="clear"))  {

 

            if (menuHandler(el)) {

 

              cleanupMenu(menuActive)

 

              clearHighlight(menuActive)

 

              active=false

 

              lastHighlight=null

 

            }

 

          }

 

        }

 

      }

 

    }

 

 

 

    function getChildren(el) {

 

      var tList = el.children.tags("TABLE")

 

      var i = 0

 

      while ((i<tList.length) && (tList[i].tagName!="TABLE"))

 

        i++

 

      if (i==tList.length)

 

        return null

 

      else

 

        return tList[i]

 

    }

 

 

 

    function doMenuDown(el) {

 

      if (el._childItem==null)

 

        el._childItem = getChildren(el)

 

      if ((el._childItem!=null) && (el.className!="disabled") && (el.className!="disabledhighlight")) {

 

        // Performance Optimization - Cache child element

 

        ch = el._childItem

 

        if (ch.style.display=="block") {

 

          removeHighlight(ch.active)

 

          return

 

        }

 

        ch.style.display = "block"

 

        if (el.className=="root") {

 

          ch.style.pixelTop = el.offsetHeight + el.offsetTop + 2

 

          ch.style.pixelLeft = el.offsetLeft + 1

 

         if (ch.style.pixelWidth==0)

 

            ch.style.pixelWidth = ch.rows[0].offsetWidth+50

 

          sinkMenu(el)

 

          active = true

 

          menuActive = el

 

        } else {

 

          childActive = el

 

          ch.style.pixelTop = getOffsetPos("Top",el,"TABLE") -3 // el.offsetTop + el.offsetParent.offsetTop - 3

 

          ch.style.pixelLeft = el.offsetLeft + el.offsetWidth

 

         if (ch.style.pixelWidth==0)

 

            ch.style.pixelWidth = ch.offsetWidth+50

 

        }    

 

      }

 

    }

 

 

 

    function doHighlight(el) {

 

      el = getReal(el)

 

      if ("root"==el.className) {

 

        if ((menuActive!=null) && (menuActive!=el)) {

 

          clearHighlight(menuActive)

 

        }

 

        if (!active) {

 

          raiseMenu(el)

 

        }         

 

        else

 

          sinkMenu(el)

 

        if ((active) && (menuActive!=el)) {

 

          cleanupMenu(menuActive)         

 

          doMenuDown(el)

 

        }

 

        menuActive = el 

 

        lastHighlight=null

 

      }

 

      else {

 

        if (childActive!=null)

 

          if (!childActive.contains(el))

 

            closeMenu(childActive, el)   

 

 

 

        if (("TD"==el.tagName) && ("clear"!=el.className)) {

 

          var ch = getRootTable(el)        

 

          if (ch.active!=null) {

 

            if (ch.active!=el) {

 

              if (ch.active.className=="disabledhighlight") 

 

                ch.active.className="disabled"

 

              else

 

                ch.active.className=""

 

              }

 

            }

 

          ch.active = el

 

          lastHighlight = el

 

          if ((el.className=="disabled") || (el.className=="disabledhighlight") || (el.id=="break"))

 

            el.className = "disabledhighlight"

 

          else {

 

            if (el.id!="break") {

 

              el.className = "highlight"

 

              if (el._childItem==null)

 

                el._childItem = getChildren(el)

 

              if (el._childItem!=null) {

 

                doMenuDown(el)

 

              }

 

            } 

 

          }

 

        }

 

      }

 

    }

 

 

 

    function removeHighlight(el) {

 

      if (el!=null)

 

        if ((el.className=="disabled") || (el.className=="disabledhighlight")) 

 

          el.className="disabled"

 

        else

 

          el.className=""

 

    }

 

 

 

    function cleanupMenu(el) {

 

      if (el==null) return

 

      for (var i = 0; i < el.all.length; i++) {

 

        var item = el.all[i]

 

        if (item.tagName=="TABLE")

 

         item.style.display = ""

 

        removeHighlight(item.active)

 

        item.active=null

 

      }

 

    }

 

 

 

 

 

    function closeMenu(ch, el) {

 

      var start = ch

 

      while (ch.className!="root") {

 

          ch = ch.parentElement

 

          if (((!ch.contains(el)) && (ch.className!="root"))) {

 

            start=ch

 

          }

 

      }

 

      cleanupMenu(start)

 

    }

 

 

 

    function checkMenu() {     

 

      if (document.all.menuBar==null) return

 

      if ((!document.all.menuBar.contains(event.srcElement)) && (menuActive!=null)) {

 

        clearHighlight(menuActive)

 

        closeMenu(menuActive)

 

        active = false

 

        menuActive=null

 

        choiceActive = null

 

      }

 

    }

 

 

 

    function doCheckOut() {

 

      var el = event.toElement     

 

      if ((!active) && (menuActive!=null) && (!menuActive.contains(el))) {

 

        clearHighlight(menuActive)

 

        menuActive=null

 

      }

 

    }

 

 

 

 

 

    function processKey() {

 

      if (active) {

 

        switch (event.keyCode) {

 

         case 13: lastHighlight.click(); break;

 

         case 39:  // right

 

           if ((lastHighlight==null) || (lastHighlight._childItem==null)) {

 

             var idx = menuActive.cellIndex

 

//             if (idx==menuActive.offsetParent.cells.length-2)

 

             if (idx==getElement(menuActive,"TR").cells.length-2)

 

               idx = 0

 

             else

 

               idx++

 

             newItem = getElement(menuActive,"TR").cells[idx]

 

           } else

 

           {

 

             newItem = lastHighlight._childItem.rows[0].cells[0]

 

           }

 

           doHighlight(newItem)

 

           break;

 

         case 37: //left

 

           if ((lastHighlight==null) || (getElement(getRootTable(lastHighlight),"TR").id=="menuBar")) {

 

             var idx = menuActive.cellIndex

 

             if (idx==0)

 

               idx = getElement(menuActive,"TR").cells.length-2

 

             else

 

               idx--

 

             newItem = getElement(menuActive,"TR").cells[idx]

 

           } else

 

           {

 

             newItem = getElement(lastHighlight,"TR")

 

             while (newItem.tagName!="TD")

 

               newItem = newItem.parentElement

 

           }

 

           doHighlight(newItem)

 

           break;

 

         case 40: // down

 

            if (lastHighlight==null) {

 

              itemCell = menuActive._childItem

 

              curCell=0

 

              curRow = 0

 

            }

 

            else {

 

              itemCell = getRootTable(lastHighlight)

 

              if (lastHighlight.cellIndex==getElement(lastHighlight,"TR").cells.length-1) {

 

                curCell = 0

 

                curRow = getElement(lastHighlight,"TR").rowIndex+1

 

                if (getElement(lastHighlight,"TR").rowIndex==itemCell.rows.length-1)

 

                  curRow = 0

 

              } else {

 

                curCell = lastHighlight.cellIndex+1

 

                curRow = getElement(lastHighlight,"TR").rowIndex

 

              }

 

            }

 

            doHighlight(itemCell.rows[curRow].cells[curCell])

 

            break;

 

         case 38: // up

 

            if (lastHighlight==null) {

 

              itemCell = menuActive._childItem

 

              curRow = itemCell.rows.length-1

 

              curCell= itemCell.rows[curRow].cells.length-1

 

 

 

            }

 

            else {

 

              itemCell = getRootTable(lastHighlight)

 

              if (lastHighlight.cellIndex==0) {

 

                curRow = getElement(lastHighlight,"TR").rowIndex-1

 

                if (curRow==-1)

 

                  curRow = itemCell.rows.length-1

 

                curCell= itemCell.rows[curRow].cells.length-1

 

 

 

              } else {

 

                curCell = lastHighlight.cellIndex - 1

 

                curRow = getElement(lastHighlight,"TR").rowIndex

 

              }

 

            }

 

            doHighlight(itemCell.rows[curRow].cells[curCell])

 

            break;

 

           if (lastHighlight==null) {

 

              curCell = menuActive._childItem

 

              curRow = curCell.rows.length-1

 

            }

 

            else {

 

              curCell = getRootTable(lastHighlight)

 

              if (getElement(lastHighlight,"TR").rowIndex==0)

 

                curRow = curCell.rows.length-1

 

              else

 

                curRow = getElement(lastHighlight,"TR").rowIndex-1

 

            }

 

            doHighlight(curCell.rows[curRow].cells[0])

 

            break;

 

        }

 

      }

 

    }

 

 

 

 

 

function make_menu() {

 

document.write("<table width='100%' cellpadding='0' cellspacing='0' border='0' style='background=rgb(212,208,200); BACKGROUND: buttonface; BORDER-BOTTOM: buttonshadow 1px solid; BORDER-LEFT: buttonhighlight 1px solid; BORDER-RIGHT: buttonshadow 1px solid; BORDER-TOP: buttonhighlight 1px solid;'>");

 

document.write("<tr><TD><SPAN class=handbtn></SPAN></TD><td>");

 

document.write("<TABLE ID=menuBar ONSELECTSTART='return false' ONCLICK='processClick()' ONMOUSEOVER='doHighlight(event.toElement)' ONMOUSEOUT='doCheckOut()' ONKEYDOWN='processKey()'><TR>");

 

 

 

       j=1;

 

       while(eval("window.OutBarFolder"+j))

 

              j++;

 

       i=1;

 

       while(i<j)

 

       {

 

              Folder=eval("OutBarFolder"+i)

 

        document.write("<TD NOWRAP CLASS=root>"+Folder[0]+"<TABLE CELLSPACING=0 CELLPADDING=0>");

 

              MakeItems(Folder);

 

        document.write("</TABLE>");

 

              i++;

 

       }

 

document.write("</TD></TR></TABLE>");

 

document.write("</td><td width=100% ONMOUSEOVER='processClick()'></td></tr></table>");

 

 

 

}

 

 

 

function MakeItems(Folder)

 

{

 

       var items=0;

 

       while(Folder[items+1])

 

              items+=5;

 

       items/=5;

 

       for(var i=1;i<items*5;i+=5)

 

       {

 

/*

 

              if(Folder[i+1]=="BREAK") {

 

                     document.write("<TD NOWRAP ID=break><HR></TD>");

 

              }

 

              else {

 

                     document.write("<TR><TD NOWRAP>"+Folder[i+1]+"</TD></TR>");

 

              }

 

*/

 

                     document.write("<TR><TD NOWRAP"+((Folder[i+0]=="none")?"":" ID='"+Folder[i+0]+"'")+((Folder[i+3]=="none")?"":" onclick=\"go(1,'"+Folder[i+3]+"')\"")+">"+((Folder[i+1]=="default")?"":"<font color="+Folder[i+1]+">")+Folder[i+2]+((Folder[i+1]=="default")?"":"</font>")+"</TD></TR>");

 

//alert("<TR><TD NOWRAP "+((Folder[i+0]=="none")?"":"ID='"+Folder[i+0]+"'")+((Folder[i+3]=="none")?"":" onclick=go(1,'"+Folder[i+3]+"')")+">"+((Folder[i+1]=="default")?"":"<font color="+Folder[i+1]+">")+Folder[i+2]+((Folder[i+1]=="default")?"":"</font>")+"</TD></TR>");

 

       }    

 

}

 

 

 

function go(i,iurl) {

 

       switch (i)

 

       {

 

              case 1 : parent.location=iurl;break; //返回首页

 

              case 2 : top.main.location='login.htm';break;  //登录

 

              case 3 : top.main.location='shenqing.htm';break;  //注册

 

              case 4 : top.main.location='addnew.asp';break;   //增加新贴

 

              case 5 : top.main.location='index1.asp';break;   //第一页

 

              case 6 : //上一页

 

                     var obj=top.main

 

                     var str=obj.location.href;      

 

                     if(str.indexOf("index1")>0)

 

                            obj.location="index1.asp@page="+obj.document.all("ppage").value;

 

                     else

 

                            obj.location="index1.asp";

 

                     break;  

 

              case 7 : //下一页

 

                     var obj=top.main

 

                     var str=obj.location.href;      

 

                     if(str.indexOf("index1")>0)

 

                            obj.location="index1.asp@page="+obj.document.all("npage").value;

 

                     else

 

                            obj.location="index1.asp";

 

                     break;  

 

              case 8 :  //最后一页

 

                     var obj=top.main

 

                     var str=obj.location.href;      

 

                     if(str.indexOf("index1")>0)

 

                            obj.location="index1.asp@page="+obj.document.all("epage").value;

 

                     else

 

                            obj.location="index1.asp";

 

                     break;  

 

              case 9: top.main.location='editinfo.asp';break;

 

              case 10: top.main.location='quit.asp';break;

 

              case 11: top.main.location='userinfo.asp';break;                 

 

              case 12:

 

                     var newwin=top.open("../../../www.xinnew.com/default.htm");

 

                     newwin.focus();

 

                     break;

 

       }

 

}

 

 

 

make_menu();

 

</script>

  <script langguage="JavaScript" src="../../../../www.xinnew.com/news2.js"></script>

  <br>

 

0 Comments

Mon

02

Mar

2009

213、显示站点信息的导航

213、显示站点信息的导航

脚本说明:

 

第一步:把如下代码加入<head>区域中

 

<SCRIPT language=javascript>

 

<!--

 

function linkDisplay(selection){

 

if(selection=="1"){document.form.info.value="凡是主页制作需要的图片资料,这里都有。";document.form.go.value="time1.htm";}

 

else if(selection=="2"){document.form.info.value="流行软件和注册机码下载,软件分类齐全!";document.form.go.value="time2.htm";}//链接自己可以加入,说明也可以更改!

 

else if(selection=="3"){document.form.info.value="主页制作密技奉献,正在学习和制作主页的朋友在这里一定能发现有用的资料。";document.form.go.value="3.htm";}

 

else if(selection=="4"){document.form.info.value="大量的中外影视明星美女的剧照和写真,詹姆斯邦德,施瓦辛格,第五元素,哈里森福特,周润发,泰坦尼克,蝙蝠侠,变脸及X-档案等剧照。苏慧伦,王菲,酒井法子,朱茵等美女桌布!";document.form.go.value="4.htm";}

 

else if(selection=="5"){document.form.info.value="几千个注册机码等着你呢!而且在不断地添加新的东西";document.form.go.value="5.htm";}

 

else if(selection=="6"){document.form.info.value="MIDI音乐屋当然是最首欢迎的MIDI乐曲下载天地了,中外流行曲,美国乡遥,影视主题曲...";document.form.go.value="6.htm";}}function moreInfo(){

 

var page=document.form.go.value;window.location=page;}

 

 

 

//-->

 

 

 

</SCRIPT>

 

 

 

 

 

 

 

第二步:把如下代码加入区域中

 

<form name=form> <input type=hidden name=go value><table border=0 width=300> <tr> <td align=center width=111><a href=javascript:linkDisplay(1);>网页图片库</a><br> </td> <td align=center width=123><a href=javascript:linkDisplay(2);>软件下载仓库</a><br> </td> <td align=center width=160><a href=javascript:linkDisplay(3);>主页制作密技</a><br> </td>  </tr> <tr> <td align=center width=111><a href=javascript:linkDisplay(4);>美女明星写真<br> </a></td> <td align=center width=123><a href=javascript:linkDisplay(5);>注册机码集中营</a><br> </td> <td align=center width=160><a href=javascript:linkDisplay(6);>MIDI音乐屋</a><br> </td> </tr> <tr> <td colspan=3 align=center width=402><div align=center><p><textarea name=info rows=5 cols=34 wrap=virtual>点击连接看个仔细</textarea><br> <input type=button name=button value=去看看 onClick=moreInfo()> </td> </tr> </table></form>

 

 

0 Comments

Mon

02

Mar

2009

212、非常好用的导航菜单

212、非常好用的导航菜单

以下代码加入<head>区域

<style type="text/css">

<!--

body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 4px; margin-right: 0px}

A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }

 A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }

a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

--></style>

<script language="JavaScript1.2">

scores = new Array(20);var numTotal=0;NS4 = (document.layers) ? 1 : 0;IE4 = (document.all) ? 1 : 0;ver4 = (NS4 || IE4) ? 1 : 0;if (ver4) {    with (document) {        write("<STYLE TYPE='text/css'>");        if (NS4) {            write(".parent {position:absolute; visibility:visible}");            write(".child {position:absolute; visibility:visible}");            write(".regular {position:absolute; visibility:visible}")        }        else {            write(".child {display:none}")        }        write("</STYLE>");    }}function getIndex(el) {    ind = null;    for (i=0; i<document.layers.length; i++) {        whichEl = document.layers[i];        if (whichEl.id == el) {            ind = i;            break;        }    }    return ind;}function arrange() {    nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height;    for (i=firstInd+1; i<document.layers.length; i++) {        whichEl = document.layers[i];        if (whichEl.visibility != "hide") {            whichEl.pageY = nextY;            nextY += whichEl.document.height;        }    }}function initIt(){    if (!ver4) return;    if (NS4) {        for (i=0; i<document.layers.length; i++) {            whichEl = document.layers[i];            if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";       }        arrange();    }    else {        divColl = document.all.tags("DIV");        for (i=0; i<divColl.length; i++) {            whichEl = divColl(i);            if (whichEl.className == "child") whichEl.style.display = "none";        }    }}function expandIt(el) { if (!ver4) return;    if (IE4) {        whichEl1 = eval(el + "Child");         for(i=1;i<=numTotal;i++){                  whichEl = eval(scores[i] + "Child");                  if(whichEl!=whichEl1) {                           whichEl.style.display = "none";                  }            }        whichEl1 = eval(el + "Child");        if (whichEl1.style.display == "none") {            whichEl1.style.display = "block";        }        else {            whichEl1.style.display = "none";        }    }    else {        whichEl = eval("document." + el + "Child");        for(i=1;i<=numTotal;i++){                  whichEl = eval("document." + scores[i] + "Child");                  if(whichEl!=whichEl1) {                           whichEl.visibility = "hide";                 }            }        if (whichEl.visibility == "hide") {            whichEl.visibility = "show";        }        else {            whichEl.visibility = "hide";        }        arrange();    }}onload = initIt;

</script>

以下代码加入<body>区域

<table border=1 bordercolor=#666666 borderlight=green width="206">

            <tr>

              <td align=center><font face="Arial, Helvetica, sans-serif"><strong class="title">下面为脚本显示区</strong><strong></strong></font></td>

            </tr>

            <tr>

              <td align=left>

                <div id='KB1Parent' class='parent'><a href="#" onClick="expandIt('KB1'); return false">

                  <img src='plus.gif' border=0 width="26" height="13">时间日期类</a></div>

                <div id='KB1Child' class='child'> <a href='time1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0 width="24" height="14">任意位置显示时钟</a><br>

                  <a href='time2.htm' target='_target'>&nbsp;<img src='blank.gif' border=0 width="24" height="14">倒计时代码生成器</a><br>

                  <a href='time3.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>八种风格时间显示</a><br>

                  <a href='time8.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>全中文日期显示</a></div>

                <div id='KB2Parent' class='parent'><a href="#" onClick="expandIt('KB2'); return false">

                  <img src='plus.gif' border=0>页面导航类</a></div>

                <div id='KB2Child' class='child'> <a href='dao1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>显示站点信息导航</a><br>

                  <a href='dao9.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>友情链接导航框</a><br>

                  <a href='dao10.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>目录式导航菜单</a><br>

                  <a href='dao11.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>重要信息说明脚本</a>

                </div>

                <div id='KB3Parent' class='parent'><a href="#" onClick="expandIt('KB3'); return false">

                  <img src='plus.gif' border=0 width="26" height="13">页面背景类</a></div>

                <div id='KB3Child' class='child'> <a href='back1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>背景向下移动</a><br>

                  <a href='back2.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>背景不停变换色彩</a><br>

                  <a href='back9.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>页面转换特效</a></div>

                <div id='KB4Parent' class='parent'><a href="#" onClick="expandIt('KB4'); return false">

                  <img src='plus.gif' border=0>页面特效类</a></div>

                <div id='KB4Child' class='child'> <a href='ye1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>字符从空中掉下来</a><br>

                  <a href='ye17.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>鼠标响应文字变色</a>

                </div>

                <div id='KB5Parent' class='parent'><a href="#" onClick="expandIt('KB5'); return false">

                  <img src='plus.gif' border=0>图形图象类</a></div>

                <div id='KB5Child' class='child'> <a href='picture1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>禁止图片下载</a><br>

                  <a href='picture11.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>图形选择脚本</a><br>

                  <a href='picture12.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>图片翻滚导航</a><br>

                  <a href='picture13.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>图片翻滚导航</a>

                </div>

                <div id='KB6Parent' class='parent'><a href="#" onClick="expandIt('KB6'); return false">

                  <img src='plus.gif' border=0>按钮特效类</a></div>

                <div id='KB6Child' class='child'> <a href='an2.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>跑马灯式链接说明</a><br>

                  <a href='an7.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>按顺序点击链接</a></div>

                <div id='KB7Parent' class='parent'><a href="#" onClick="expandIt('KB7'); return false">

                  <img src='plus.gif' border=0>鼠标事件类</a></div>

                <div id='KB7Child' class='child'> <a href='shu1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>图片跟随鼠标</a><br>

                  <a href='shu5.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>禁用右键自动导航</a><br>

                  <a href='shu6.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>鼠标激活警告框</a>

                </div>

                <div id='KB8Parent' class='parent'><a href="#" onClick="expandIt('KB8'); return false">

                  <img src='plus.gif' border=0>Cookie脚本</a></div>

                <div id='KB8Child' class='child'> <a href='cook1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>随登陆次数变提示</a><br>

                  <a href='cook8.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>检测IE去过站点</a><br>

                  <a href='cook9.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>离开时显示信息</a><br>

                  <a href='cook10.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>弹出窗口自动关闭</a><br>

                  <a href='cook11.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>离开页面弹出窗口</a><br>

                  <a href='cook12.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>进入时显示信息</a></div>

                <div id='KB9Parent' class='parent'><a href="#" onClick="expandIt('KB9'); return false">

                  <img src='plus.gif' border=0>文本特效类</a></div>

                <div id='KB9Child' class='child'> <a href='text1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>随机信息显示</a><br>

                  <a href='ye9.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>文字颜色渐变脚本</a><br>

                  <a href='ye5.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>文本自动输出</a></div>

                <div id='KB10Parent' class='parent'><a href="#" onClick="expandIt('KB10'); return false">

                  <img src='plus.gif' border=0>状态栏特效</a></div>

                <div id='KB10Child' class='child'> <a href='ye8.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>状态栏跑马灯脚本</a><br>

                  <a href='zhuang1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>文字从右弹出</a><br>

                  <a href='zhuang8.htm' target='_blank'>&nbsp;<img src='blank.gif' border=0>title变化弹出</a></div>

                <div id='KB11Parent' class='parent'><a href="#" onClick="expandIt('KB11'); return false">

                  <img src='plus.gif' border=0> &nbsp; &nbsp;</a></div>

                <div id='KB11Child' class='child'> <a href='password1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>控制他人进入页面</a><br>

                  <a href='password3.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>用来实现会员制度</a><br>

                  <a href='password4.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>密码保护相应页面</a><br>

                  <a href='password5.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>自己编制密码表</a></div>

                <div id='KB12Parent' class='parent'><a href="#" onClick="expandIt('KB12'); return false">

                  <img src='plus.gif' border=0> &nbsp; &nbsp;</a></div>

                <div id='KB12Child' class='child'> <a href='zh1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>加密页面源代码</a><br>

                  <a href='zh2.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>访问时间限制</a><br>

                  <a href='zh11.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>搜索引擎登记</a><br>

                  <a href='zh12.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>下载记时器脚本</a>

                </div>

                <div id='KB13Parent' class='parent'><a href="#" onClick="expandIt('KB13'); return false">

                  <img src='plus.gif' border=0> &nbsp; &nbsp;</a></div>

                <div id='KB13Child' class='child'> <a href='you1.htm' target='_target'>&nbsp;<img src='blank.gif' border=0>一款流行游戏</a></div>

                <script>numTotal=14;scores[1]='KB1';scores[2]='KB1';scores[3]='KB2';scores[4]='KB3';scores[5]='KB4';scores[6]='KB5';scores[7]='KB6';scores[8]='KB7';scores[9]='KB8';scores[10]='KB9';scores[11]='KB10';scores[12]='KB11';scores[13]='KB12';scores[14]='KB13';</script>

              </td>

            </tr>

          </table>

0 Comments

Mon

02

Mar

2009

211、信息框显示链接

211、信息框显示链接

脚本说明:

第一步:把如下代码加入<head>区域中(你可以对链接及说明作相应修改)

<SCRIPT Language="JavaScript">

<!-- Hide from JavaImpaired Browsers

function MakeArray(n) {                   

this.length = n;  

for (var i = 1; i <= n; i++) {     

this[i] = 0 }    

return this   

 }

var ToolTips = new MakeArray(1);       

 ToolTips[0] = 1;       

ToolTips[1] = "聊天室";       

ToolTips[2] = "搜索引擎";      

 ToolTips[3] = "把鼠标放到链接上看看信息框的信息。";

function writeTip(imgIndex ){             

document.hform.tips.value=(ToolTips[imgIndex]);} //--></Script>

 

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

<FORM NAME='hform'><INPUT TYPE="text" NAME="tips" SIZE="70" value="把鼠标放到链接上看看信息框的信息。"></FORM><CENTER><A HREF="chat.htm" onMouseOver="writeTip(1);return true" onMouseOut="writeTip(3)">聊天室</A> | <A HREF="chsearch.htm" onMouseOver="writeTip(2);return true" onMouseOut="writeTip(3)">搜索引擎</A></CENTER>

 

0 Comments