📄 d0008.htm
字号:
<!--Saved from《天索星网》http://www.tasoo.2000c.net,E-mail:tasoo_cn@yahoo.com.cn-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!-- A:link {text-decoration: none; color:#000000}
A:visited {text-decoration: none; color: #000000}
A:active {text-decoration: none; color: #FF0000}
A:hover {text-decoration: underline; color: FF0000}
body{font-size=9pt}
TH{FONT-SIZE: 9pt}
TD{ FONT-SIZE: 9pt}-->
</style>
<title>《网络教程》之Javascript--下拉式导航菜单——02</title>
<script Language="JavaScript">
<!-- Hide the script from old browsers --
function surfto(form) {
var myindex=form.dest.selectedIndex
window.open(form.dest.options[myindex].value, target="_blank");
}
//-->
</script>
</head>
<body topmargin="0" leftmargin="0">
<div align="center"><center>
<table border="0" width="90%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="3" height="62"><div align="center"><center><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="250"><img src="../photo/jx.gif" border="0" WIDTH="200" HEIGHT="80"></td>
<td width="468" height="60"></td>
</tr>
</table>
</center></div></td>
</tr>
<tr>
<td width="20%" bgcolor="#C8C882" valign="middle" align="center" height="22"></td>
<td width="80%" bgcolor="#C8C882" valign="middle" align="center" colspan="2" height="22"><strong><span style="font-size: 10pt; font-family: Arial">javascript导航类</span></strong></td>
</tr>
<tr>
<td width="20%" valign="top" align="left"><div align="center"><center><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">时间类</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">文字类</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">导航类</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">鼠标类</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">按钮类</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">跑马灯</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm"><strong><font face="Arial">COOKIE</font></strong>类</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="30" bgcolor="#C8C882"><span style="font-size: 9pt"><a href="index.htm">其他类</a></span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="10" bgcolor="#505028"></td>
</tr>
</table>
</center></div></td>
<td width="80%" valign="top" align="left" colspan="2" height="242"><div align="center"><center><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bgcolor="#EBEBEB" valign="middle" align="center" height="18" colspan="3"><span style="font-size: 9pt">下拉式导航菜单——02</span></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="2" colspan="3"></td>
</tr>
<tr>
<td width="100%" valign="middle" align="center" height="1" colspan="3" bgcolor="#000080"></td>
</tr>
<tr>
<td width="16%" valign="middle" align="center" height="22"></td>
<td width="67%" valign="middle" align="center" height="22"><form NAME="myform1">
<div align="center"><center><p><select NAME="dest" SIZE="1">
<option SELECTED VALUE>请选择项目 </option>
<option VALUE="menu1.htm">目录一 </option>
<option VALUE="menu2.htm">目录二 </option>
</select> <input TYPE="button" VALUE="确认" onClick="surfto(this.form)" style="font-size: 9pt; background-color: rgb(120,0,120); color: rgb(200,200,200)"> </p>
</center></div>
</form>
</td>
<td width="17%" valign="middle" align="center" height="22"></td>
</tr>
<tr>
<td width="16%" valign="middle" align="center" height="20"></td>
<td width="67%" valign="middle" align="center" height="20"><span style="font-size: 9pt; color: rgb(255,0,0)">拷贝下面的代码到你的html文件的<head>和</head>之间;</span></td>
<td width="17%" valign="middle" align="center" height="20"></td>
</tr>
<tr>
<td width="16%" valign="middle" align="center" height="22"></td>
<td width="67%" valign="middle" align="left" height="22" bgcolor="#F0FAFF"><span style="font-size: 9pt"><br>
<script Language="JavaScript"><br>
<!-- Hide the script from old browsers --function surfto(form) {var
myindex=form.dest.selectedIndexwindow.open(form.dest.options[myindex].value,
target="_blank");}//--><br>
</script></span><hr size="1">
<p><span style="font-size: 9pt; color: rgb(255,0,0)">
拷贝下面的代码到你的html文件的<body>和</body>之间</span><span style="font-size: 9pt"><br>
<br>
<form NAME="myform1"><br>
<div align="center"><center><p><select
NAME="dest" SIZE="1"><br>
<option SELECTED VALUE>请选择项目 </option><br>
<option VALUE="menu1.htm">目录一 </option><br>
<option VALUE="menu2.htm">目录二 </option><br>
</select> <input TYPE="button" VALUE="go"
onClick="surfto(this.form)"> </p><br>
</center></div><br>
</form></span><br>
<br>
<span style="font-size: 9pt; color: rgb(255,0,128)">说明:此款菜单的特点在于你可以选择你链接的页面在任何一个frame的帧页里打开。如你的页面用了左右两个帧页,左面菜单索引,右面主要显示内容,此款菜单的作用就是用来实现这个效果的。<br>
只要将“第一步”代码中的<font color="#008080">target="_blank"</font>中的_blank替换成你的帧页的名称就可以了。例如:target="main"</span></td>
<td width="17%" valign="middle" align="center" height="22"></td>
</tr>
</table>
</center></div></td>
</tr>
<tr>
<td width="20%" bgcolor="#FFFFFF" valign="middle" align="center" height="20"></td>
<td width="60%" height="20"></td>
<td width="20%" height="20"></td>
</tr>
<tr>
<td width="20%" bgcolor="#FFFFFF" valign="middle" align="center" height="17"></td>
<td width="60%" height="17"><p align="center"><span style="font-size: 9pt"><a href="d0007.htm">上一页</a> <a href="d0009.htm">下一页</a></span></td>
<td width="20%" height="17"></td>
</tr>
<tr>
<td width="20%" bgcolor="#FFFFFF" valign="middle" align="center" height="14"></td>
<td width="60%" height="14"></td>
<td width="20%" height="14"></td>
</tr>
<tr>
<td width="20%" bgcolor="#FFFFFF" valign="middle" align="center" height="14"></td>
<td width="60%" height="14"></td>
<td width="20%" height="14"></td>
</tr>
<tr>
<td width="20%" bgcolor="#FFFFFF" valign="middle" align="center" height="47"></td>
<td width="60%" height="47"><div align="center"><center><table cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="center"><font color="#969696"><span style="font-size: 9pt">《天索星网》
星网制作 版权所有</span></font></td>
</tr>
<tr>
<td width="100%"><p align="center"><font color="#969696"><span style="font-size: 9pt; font-family: Arial">©2000-2001 All Rights Reserved</span></font></td>
</tr>
<tr>
<td width="100%"></td>
</tr>
</table>
</center></div></td>
<td width="20%" height="47"></td>
</tr>
</table>
</center></div>
</body>
</html>
<!--Saved from天索星网 版权所有;http://www.tasoo.2000c.net,E-mail:tasoo_cn@yahoo.com.cn-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -