日期:2014-05-17  浏览次数:20988 次

JS问题求帮助。
<!--#include file="conn.asp"-->
<script language="javascript" src="js/jquery-1.3.2.min.js"></script>
<select name="tid" id="tid" onchange="city_change(this.value,'model')">
<!-- <option value="">商品类别</option>-->
<%
'sql="select * from news where parentid=2 order by classOrder asc,addDate asc"
sql="select * from newsclass where parentid=2 order by classOrder asc,addDate asc"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
do while not rs.eof 
%>
  <option value="<%=rs("classid")%>"><%=rs("classname")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
%>  
</select>
  &nbsp;<span id="ppaispan">
<select name="model" class="main" id="model" style="width:100px">

</select>

<script type="text/javascript">
function city_change(tid,city_html_id){
$.get("types.asp", {category:'model', province:tid}, 
function(data) {
$('#'+city_html_id).html(data);
});
}
</script>
<!--------------types.asp-------------------->

<!--#include file="conn.asp"-->

<%
if (request("category") == "model") then
response.Write("<option value='0'>请选择类别</option>")
if(REQUEST("province")="") then
REQUEST("province") =null
end if 
if(REQUEST("province") != "") then 
' sql = "select * from ot_cities where provinceid="REQUEST("province'];"
sqlx="select * from newsclass where parentid="&REQUEST("province")&" order by classOrder asc,addDate asc"
' result = $DB->GetAll($sql);
set rsx=server.CreateObject("adodb.recordset")
  rsx.open sqlx,conn,1,1
if rsx.eof then response.Write("<option value='-1'>[暂无信息]</option>")
  do while not rsx.eof
response.Write(rsx("classname"))
rsx.movenext
loop
rsx.close
set rsx=nothing
end if
end if
%>

------解决方案--------------------
描述你的问题呀,你希望别人一行一行帮你分析实验吗
------解决方案--------------------
二级联动下拉菜单?