易截截图软件、单文件、免安装、纯绿色、仅160KB

关于struts使用html:select标签的默认选项

方法一:
<html:select property="id">  //这里一定不能再用vlue属性了,只用一个property就可以了   
 <c:forEach var="row" item="${rs.rows}">      
  <html:option value="row.id">  
               <c:out value="row.name"/>  
         </html:option>      
 </c:forEach>        
</html:select>
方法二:
jsp里:
<html:select property="userid">
      <html:options collection="userHtmlSelect" property="value" labelProperty="label"/>
</html:select>
ActionForm 里:
private   java.lang.String userid="admin";   //默认值
Action里:
form.setUserid("guest");//修改默认值
//设置下拉选项
List rs = new java.util.ArrayList();
             rs.add(new   org.apache.struts.util.LabelValueBean("管理员",
                     "admin"));
             rs.add(new   org.apache.struts.util.LabelValueBean("客人","guest"));
request.getSession().setAttribute("userHtmlSelect",rs);
return mapping.findForward("index");
方法三:
<html:select property= “m_select ” value= “C2 “>
<html:option value= “C1 “> 您的选择1 </html:option>
<html:option value= “C2 “> 您的选择2 </html:option>
<html:option value= “C3 “> 您的选择3 </html:option>
</html:select>


相关文档:

html页面表格导出到excel总结


<table id="tableExcel" width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5" align="center">html 表格导出道Excel</td>
</tr>
<tr>
<td>列标题1</td>
<td>列标题2</td>
......

大学毕业设计C#、winfrom、.net、html、div+css代做

还在为毕业设计而烦恼么 看看这里 我帮你搞定就好
本人实际开发经验丰富 学过各类程序编写 前后台都可以
现在的工作不怎么景气呀 所以找点外快养家糊口呀 呵呵
报酬嘛 过得去就行了 没什么要求 交个朋友嘛
如果有意者可与本人联系qq604884385 Tel13438309220 ......

html 使用JS增加表格行信息

<script language="javascript">
   function addItem()
 {
  var oTable = document.getElementById("whtable");
  var oTbody = oTable.tBodies[0];
   var v = oTbody.rows.length;
   oTbody.insertRow(v); 
   oTbody.rows[v].id="itemtr ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号