关于下拉式清单的小问题,马上能结贴

1<select class="smallSel" name="sort_id" size="1"> ‘问题1:class="smallSel" 什么意思?   

dim rs,sql
dim content,sel
sort_id=request("sort_id")
set rs=server.createobject("adodb.recordset")
sql="select * from sort"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "Not record."
else
do while not rs.eof
if sort_id=cstr(rs("sort_id")) then
sel="selected" ’问题2:sel="selected" 什么意思?
else
sel=""
end if
response.write "<option "="" &="" name="sort_id" sel="" value='"+CStr(rs("sort_ID"))+"'>"+rs("sort_name")+"</option>"+chr(13)+chr(10) ‘问题3:请把这句花详细解释一下,谢谢
rs.movenext
loop
end if
rs.close

 1  
 2\---------------------------------------------------------------   
 3  
 41.样式   
 52.表示"已选"   
 63.添加<option>   
 7\---------------------------------------------------------------   
 8  
 9sel 是判断是否选中该列表.   
10\---------------------------------------------------------------   
11  
12chr(13)+chr(10)又是什么意思?我怎么什么都不懂,救命啊   
13\---------------------------------------------------------------   
14  
15问题1:class="smallSel"什么意思?   
16解答:smallSel是CSS样式的标志,如   
17<style type="text/css">   
18.smallSel{width:50;height:18;color=#0000FF}   
19</style>
20<body>
21<select class="smallSel" name="sort_id" size="1">
22</select></body>   
23问题2:sel="selected" 什么意思?   
24解答:"="是vb的赋值语句,这句话的意思是把字符串selected赋值给变量sel   
25问题3:请把这句花详细解释一下,谢谢.   
26解答:response.write 是把信息输出到客户端的浏览器。</option></select>
Published At
Categories with Web编程
comments powered by Disqus