列表框选择链接:
<script language="javascript">
function jsJumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");//不新建
//eval("window.open('" + selObj.options[selObj.selectedIndex].value + "')");//新建窗口
if (restore) selObj.selectedIndex=0;
}
</script>
<select name="selectURL1" class="width125" id="selectURL1" onChange="jsJumpMenu('parent',this,0)" size="1">
<%
if rs2.eof and rs2.bof then
response.write "<option value='No Class'>No Class</option>"
else
response.write "<option value='spzsa.asp?id="&id&"'>All Class</option>"&vbcrlf
do while not rs2.eof
response.write "<option value='spzsa.asp?id="&id&"&ptypeid="&rs2("ptypeid")&"'"
if request("ptypeID")<>"" then '选哪个,哪个就显示
if rs2("ptypeID")=cint(request("ptypeID")) then response.write " selected "
end if
response.write ">"&rs2("ptypename")&"</option>"&vbcrlf
rs2.movenext
loop
end if
rs2.close
%>
</select>
本文地址:http://com.8s8s.com/it/it8005.htm