select 跳转页面的问题

来源:百度知道 编辑:UC知道 时间:2024/06/22 20:33:36
index.php内容如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:v>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body>
<script language="javascript">
function changese(obj){
window.location.href="index.php?tian="+obj.value
}
</script>
<select id="tian" size="1" onchange="changese(this)">
<option value="0">一</option>
<option value="1">二</option>
<option value="2">三</option>
<option value="3">四&l

暂时没想到什么简练的代码,就先上个繁琐一点的
<option value="0" <%if trim(request("tian"))="0" then selected%>>一</option>
<option value="1" <%if trim(request("tian"))="1" then selected%>>二</option>
<option value="2" <%if trim(request("tian"))="2" then selected%>>三</option>
<option value="3" <%if trim(request("tian"))="3" then selected%>>四</option>
<option value="4" <%if trim(request("tian"))="4" then selected%>>五</option>