asp下拉列表动态内容取值问题

来源:百度知道 编辑:UC知道 时间:2024/06/09 07:44:44
<tr bgcolor="#FFFFFF">
<td width="10%" height="25" align="right">类    别:</td>
<td width="628"><select name="sort_id" id="sort_id" dataType="Require" msg="请选择产品类别!">
<option selected>请选择</option>
<% set rs1=server.CreateObject("adodb.recordset")
sql="select id,sort from product_sort order by sx asc"
rs1.open sql,conn,1,1
do while not rs1.eof %>
<option value="<%= rs1("id") %>"><%= rs1("sort") %></option>
<% rs1.movenext
loop
rs1.close
set rs1=nothing
sort=Trim(Request.Form("sort_id"))
%>

</select>  <font color="red">*<

<script type="text/javascript">
function hh(t){
if(t.value==4){
document.getElementById("pic1").setAttribute("className","s");
document.getElementById("pic2").setAttribute("className","s");
document.getElementById("pic1").setAttribute("class","s");
document.getElementById("pic2").setAttribute("class","s");
}
else{
document.getElementById("pic1").setAttribute("className","h");
document.getElementById("pic2").setAttribute("className","h");
document.getElementById("pic1").setAttribute("class","s");
document.getElementById("pic2").setAttribute("class","s");
}
}
</script>
<style type="text/css">