<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>用下拉菜单跳转页面</title>
<script language="javascript">
function getValue(){
var obj = document.getElementById("sel");
window.location.href="http://localhost/"+obj.options[obj.selectedIndex].value;
}
</script>
</head>
<body>
论坛跳转:
<form id="form1" name="form1" method="post" action="">
<select name="select" id="sel" οnchange="getValue()">
<option value="java.htm">java板块</option>
<option value="delphi.htm">delphi板块</option>
<option value="php.htm">php板块</option>
</select>
</form>
</body>
</html>
用下拉菜单跳转页面
最新推荐文章于 2023-11-03 10:48:55 发布