关于下拉框的问题

假设我的下拉框有如下内容,现在我需要显示某个已注册用户的信息,那么我怎么根据读出来的数据库信息动态改变下拉框显示的内容

1<form action="test2.asp" method="post" name="form1">
2<select name="select">
3<option value="Watch Tv">TV</option>
4<option value="Play Ball">Play</option>
5</select>
6<input type="submit" value="提交"/>
7</form>

---------------------------------------------------------------

1<form action="test2.asp" method="post" name="form1">
2<select name="select">
3<option``` "="" ```="" if="" response.write="" rs("name")="Watch Tv" selected"="" then="" value="Watch Tv">TV
4<option``` "="" ```="" if="" response.write="" rs("name")="Play Ball" selected"="" then="" value="Play Ball">Play
5</option```&gt;&lt;/option```></select>
6<input type="submit" value="提交"/>
7</form>

---------------------------------------------------------------

1<form action="test2.asp" method="post" name="form1">
2<select name="select">
3<option ```="" ```selected```="" end="" if="" rs("ss").value="Watch Tv" then="" value="Watch Tv"&gt;TV&lt;/option&gt;
4&lt;option ```="" ```selected```="" end="" if="" rs("ss").value="Play Ball" then="" value="Play Ball">Play</option>
5</select></form>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus