您的位置:程序门 -> java -> eclipse



如何用程序动态修改myeclipse中的<html:select>标签?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何用程序动态修改myeclipse中的<html:select>标签?
发表于:2008-01-15 22:59:50 楼主
<html:select> 中的内容是从数据库中读出的。谢谢!
发表于:2008-01-15 23:25:111楼 得分:0
写java代码或者用iterator标签
html code
<list list=(list)request.getattribute("xxx");> <html:select property="xxx"> <%forint i=0;i<list.size();i++){ xxx xxx=list.get(i); %> <html:option value="<%=xxx.getxxx()%>"><%=xxx.getxxx()%></html:option> <%}%> </html:select>

或者
html code
<html:select property="xxx"> <logic:iterate id="发送过来时属性名" name="xxx" type="xx.xxx"> <option value='<bean:write name="xxx" property="属性名"/>'> <bean:write name="xxx" property="属性名"/> </option> </logic:iterate> </html:select>
发表于:2008-01-16 08:47:262楼 得分:0
那么在action或class中如何用java语句做呢?谢谢!


快速检索

最新资讯
热门点击