如何根据选择下拉列表来变换相应的内容~
如何添加代码,使得根据选择不同的类别,如“小学”或者“初中” ,使的下面的内容也随之改变呢?程序代码:
<body> <select name="select"> <option selected="selected">小学</option> <option>初中</option> </select> <table width="150" height="100" border="1"> <tr> <td>根据选择变化内容</td> </tr> </table> </body>
当然我的 select 是动态读取数据库的:
<select name="newsclass" id="newsclass">
<% '从newsclass表中读取类别
Set Rs1 = Server.CreateObject("ADODB.RecordSet")
Sql1="Select * From newsclass where class in(5,6,7) order by id asc"
Rs1.Open Sql1,conn,3,3
Do While not Rs1.EOF
Response.Write "<option value=" & Rs1("class") & ">" & Rs1("title") & "</option>"
Rs1.MoveNext
Loop
Rs1.Close
Set Rs1=nothing
%>
</select>
[[it] 本帖最后由 sjzfls 于 2008-10-27 09:24 编辑 [/it]]