[CODE]<script language=JavaScript >
function WebSel_Change(val)
{
self.location=val;
}
</script>
<select name=WebSel onChange=WebSel_Change(this.options[this.selectedIndex].value); >
<option selected>请选择网站</option>
<option value=http://www.sina.com.cn >新浪</option>
<option value=http://www.163.com >网易</option>
<option value=http://cn.yahoo.com >雅虎中国</option>
</select >[/CODE]
[此贴子已经被作者于2006-6-20 13:14:33编辑过]
要点就是onChange=WebSel_Change(this.options[this.selectedIndex].value);
下拉列表的change事件和self.location的属性。
当列表选择时this.options[this.selectedIndex].value返回列表选择的值(value=)。
self.location=val;作用就是用列表选择的值改变当前页的URL地址。
最简单的解决思路,用iframe显示信息
比如
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%if session("language")="c" then response.write"全球制造处KPI填报查询系统" else response.write"The system of filling and searching from the global manufacture" end if%></title>
<link rel="stylesheet" type="text/css" href="fqweb.css">
<base target="_top">
</head>
<body bgproperties="fixed" topmargin="5" bottommargin="0" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0">
<div align="center">
<center>
<table border="0" width="800" bgcolor="#CFDFEF" bordercolorlight="#000000" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" style="border: 1 solid #336699">
<tr>
<td width="800" style="margin-left: 5" bgcolor="#336699" align="center" colspan="11"><img border="0" src="images/kpitop.jpg"></td>
</tr>
<tr><td><script language=JavaScript >
function WebSel_Change(val)
{
ViewInf.location=val;
}
</script>
<select name=WebSel onChange=WebSel_Change(this.options[this.selectedIndex].value); >
<option selected>请选择网站</option>
<option value="top1.asp?action=newp">newp</option>
<option value="top1.asp?action=newp1">newp1</option>
<option value="top1.asp?action=newp2">newp2</option>
<option value="top1.asp?action=newp3">newp3</option>
<option value="top1.asp?action=newp4">newp4</option>
</select ></td></tr>
<%if request.QueryString("action")="newp" then%>
<tr><td bgcolor="#336699">
<table cellspacing="0" cellpadding="0" width="800" height="26">
<tr>
<td height="26" style="border-right: 1 dotted #FFFFFF; border-bottom: 1 dotted #FFFFFF; margin-left: 5" align="center" bgcolor="#000000" width="204"><a href="monthly_view3.asp"><font size="2" color="#FFFF00">每月查看</font></a></td>
</tr>
</table>
</td></tr>
<%end if%>
<%if request.QueryString("action")="newp1" then%>
<tr><td bgcolor="#336699">
<table cellspacing="0" cellpadding="0" width="800" height="27">
<tr>
<td height="27" style="border-right: 1 dotted #FFFFFF; border-bottom: 1 dotted #FFFFFF; margin-left: 5" align="center" bgcolor="#000000" width="80" rowspan="2"><a href="monthly_view3.asp"><font size="2" color="#FFFF00">每月查看</font></a></td>
</tr>
</table>
</td></tr>
<%end if%>
<%if request.QueryString("action")="newp2" then%>
<tr><td bgcolor="#336699">
<table cellspacing="0" cellpadding="0" width="800" height="27">
<tr>
<td height="27" style="border-right: 1 dotted #FFFFFF; border-bottom: 1 dotted #FFFFFF; margin-left: 5" align="center" bgcolor="#000000" width="133"><a href="monthly_view3.asp"><font size="2" color="#FFFF00">每月查看</font></a></td>
</tr>
</table>
</td></tr>
<%end if%>
<%if request.QueryString("action")="newp4" then%>
<tr><td bgcolor="#336699">
<table cellspacing="0" cellpadding="0" width="800" height="27">
<tr>
<td height="27" style="border-right: 1 dotted #FFFFFF; border-bottom: 1 dotted #FFFFFF; margin-left: 5" align="center" bgcolor="#000000" width="72"><a href="monthly_view3.asp"><font size="2" color="#FFFF00">每月查看</font></a></td>
</tr>
</table>
</td></tr>
<%end if%>
</table>
</center>
</div>
</body>
</html>
上面红色部门如何实现?
<form method="post" action="">
<select name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
<option selected>请选择</option>
<option value="?action=newp">newp</option>
<option value="?action=newp1">newp1</option>
<option value="?action=newp2">newp2</option>
<option value="?action=newp3">newp3</option>
<option value="?action=newp4">newp4</option>
</option>
</select>
</form>
[此贴子已经被作者于2006-6-21 9:35:40编辑过]