请教各位如何解决select和option的问题.
我做了个二级的新闻发布系统,现在在添加新闻页面有个让用户选择新闻类别的select下拉框,想让当用户选择大类的选项时候提示"新闻只能发布在二级分类下"或者直接让用户没办法选择大类,新闻要发布在二级分类下,这个怎么做到,用什么方法.谢谢大家
<select name="ttype">
<option value="">选择分类</option>
<%
do while Not rs.eof
smallsql="select * from art_type where sid="&rs("id")
set smallrs=conn.execute(smallsql)
%>
<option value="<%=rs("id")%>" disabled>----<%=rs("art_type")%>----</option>'显示大类
<%
while not smallrs.eof
%>
<option value="<%=smallrs("id")%>"><%=smallrs("art_type")%></option>'显示小类
<%
smallrs.movenext
wend
rs.movenext
loop
smallrs.close
set smallrs=nothing
%>
</select>
就是在显示大类让用户不能选择或者提示新闻只能发布在二级分类下