下来菜单传值[asp+js]

 

image

(1)

clip_image002[7]

<%
set ItemRs=server.CreateObject("adodb.recordset")
ItemSql="select * from Howia_SuggestionSort"
ItemRs.open ItemSql,conn,1,3
if ItemRs.eof and ItemRs.bof then   
Response.Write("暂无信息")
else
Response.Write("<select name=""SelectItem"" id=""BigID"" style=""width:200px;"" onchange=""ClassChange(this.value)"">")
Response.Write("<option value=""0"" selected>选择大类</option>")
do while not ItemRs.eof
%>
<option id="Sledcom" name="Sledcom" value="<%=ItemRs("BigID")%>"><%=ItemRs("SortName")%></option>
<%
ItemRs.movenext                                                                                
loop   
Response.Write("</select>")
ItemRs.close                                                                                    
set ItemRs=nothing                                                                                        
end if
%>

(2)

clip_image002[9]

传值 注意隐藏起来

(3)

 

clip_image002[11]

<script type="text/javascript">
function ClassChange(locationid)
{ 
      document.getElementById('Keyword').value = document.getElementsByTagName("option")[document.getElementById("SelectItem").selectedIndex].value;
}
</script>
posted @ 2011-06-28 17:55  【唐】三三  阅读(239)  评论(0编辑  收藏  举报