友情连接浏览器

1、拷贝下面的代码到你的html文件的

1<head>和</head>

之间

 1<script language="JavaScript">   
 2<!--   
 3function go_to_station(){   
 4if (document.stationform.stationselect.options[0].selected){   
 5window.location.href = "http://202.98.107.86/xutao/default.htm";}   
 6else if (document.stationform.stationselect.options[1].selected)   
 7{ window.location.href = "http://member.netease.com/~xwtao/default.htm";}   
 8else if (document.stationform.stationselect.options[2].selected)   
 9{ window.location.href = "http://chaofan.bentium.net/default.htm";}   
10else if (document.stationform.stationselect.options[3].selected)   
11{ window.location.href = "http://laosong.yeah.net/default.htm";}   
12else if (document.stationform.stationselect.options[4].selected)   
13{ window.location.href = "http://ipismusic.yeah.net/default.htm";}   
14else if (document.stationform.stationselect.options[5].selected)   
15{ window.location.href = "http://digest.topcool.net";}   
16else if (document.stationform.stationselect.options[6].selected)   
17{ window.location.href = "http://msbnet.yeah.net/default.htm";}   
18else if (document.stationform.stationselect.options[7].selected)   
19{ window.location.href = "http://www.hiddenfbi.com/default.htm";}   
20return true;   
21}   
22//This is were you load the Discription and the Author   
23function textValue(){   
24if (document.stationform.stationselect.options[0].selected){   
25document.stationform.disc.value = "爱情故事,photoshop"   
26document.stationform.author.value = "【徐涛】";}   
27else if (document.stationform.stationselect.options[1].selected)   
28{ document.stationform.disc.value = "每日推荐一张CD,一个好站,一个MP3"   
29document.stationform.author.value = "【天虹】";}   
30else if (document.stationform.stationselect.options[2].selected)   
31{ document.stationform.disc.value = "有独有的Java和,VB教程"   
32document.stationform.author.value = "【笨男孩】";}   
33else if (document.stationform.stationselect.options[3].selected)   
34{ document.stationform.disc.value = "缘分天空,情感交流的好地方"   
35document.stationform.author.value = "【laosong】";}   
36else if (document.stationform.stationselect.options[4].selected)   
37{ document.stationform.disc.value = "现有歌词2681首"   
38document.stationform.author.value = "【ipis】";}   
39else if (document.stationform.stationselect.options[5].selected)   
40{ document.stationform.disc.value = "网上原创请您推荐妙文佳作"   
41document.stationform.author.value = "【koki】";}   
42else if (document.stationform.stationselect.options[6].selected)   
43{ document.stationform.disc.value = "电脑图形设计,flash在线教材大全"   
44document.stationform.author.value = "【MSB】";}   
45else if (document.stationform.stationselect.options[7].selected)   
46{ document.stationform.disc.value = "如果是mm这边进,姐妹们说悄悄话了"   
47document.stationform.author.value = "【hiddenfbi】";}   
48return true;   
49}   
50  
51//-->   
52</script>

2、拷贝下面的代码到你的html文件的

1<body>和</body>

之间

 1<form name="stationform">
 2<table>
 3<tr>
 4<td>
 5<select class="yk9" multiple="" name="stationselect" onchange="textValue()" size="8">
 6<option>徐涛有约</option>
 7<option>听涛阁</option>
 8<option>超凡时速</option>
 9<option>红牌楼</option>
10<option>蟑螂音乐歌词库</option>
11<option>网文观止</option>
12<option>MSB图形世界</option>
13<option>准我自我</option>
14</select></td>
15<td><div align="left"><p>站长大名<br/>
16<input name="author" size="40" type="text"/> <br/>   
17站点主题<br/>
18<textarea class="yk9" cols="40" name="disc" rows="3" wrap="physical"></textarea><br/>
19<br/>
20<input class="yk9" name="stationbutton" onclick="go_to_station()" type="button" value="立刻去看看"/></p></div></td>
21</tr>
22</table>
23</form>

说明:将第一段代码中的"链接地址"和"站长名称""站点简介"改为你自己的友情连接内容,将第二段代码中的站点名称修改为相对应的站点。

Published At
Categories with Web编程
Tagged with
comments powered by Disqus