html标签用法(不断更新添加)

1:<html:optionsCollectiion>的用法

<tr bgcolor="f5f5f5">
      <td width="25%"> <div align="right">品牌 :</div></td>
      <td width="75%"> <html:select property="brandid">
          <html:option value="">***无***</html:option>
    //brands为从后台查询到的数据集合,label表示显示出来的,code表示选择后的值v,然后将v赋值给brandid
          <html:optionsCollection name="brands" label="name" value="code"/>
 
        </html:select>(<a href="<html:rewrite action='/control/brand/manage'/>?method=addUI">添加品牌</a>)</td>
</tr>

 

 

 

组装html语句
1:<a href="<html:rewrite action='/control/product/type/manage'/>?method=addUI">添加产品类别</a>

<html:form action="/control/product/style/list?productid=3" method="post">//有待验证

2:
组装html语句:<c:forEach items="${gps}" var="gptype">
 <c:set var="menuout" value="${menuout}&gt;&gt;<a href='/baba1.1/control/product/manage.do?method=selectUI&typeid=${gptype.typeid }'>${gptype.name }</a>"></c:set>
</c:forEach>

输出效果
<c:out value="${menuout }" escapeXml="false"></c:out>

 

3:设置<c:if>条件来判断是否禁用按钮

 <input name="visible" type="button" class="frm_btn" id="visible" onClick="javascript:changeMet('visible')" <c:if test="${fn:length(styles)<0}">disabled="disabled"</c:if> value="上架"> &nbsp;&nbsp;
     <input name="disVisible" type="button" class="frm_btn" id="disVisible" onClick="javascript:changeMet('disVisible')" <c:if test="${fn:length(styles)<0}">disabled="disabled"</c:if> value="下架"> &nbsp;&nbsp;

 

 

 

1:在jsp页面上添加如下页面,则就可以对所有为textarea的元素,如<html:textarea property="descriptions" cols="80" rows="23"></html:textarea>形成html编辑器的效果,这里的在线编辑器是要用到js函数库的
<script type="text/javascript" src="/js/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
 language : "zh_cn",
 mode : "textareas",
 theme : "advanced",
 //width : "500",
 plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu",
 theme_advanced_buttons1_add_before : "save,separator",
 theme_advanced_buttons1_add : "fontselect,fontsizeselect",
 theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
 theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
 theme_advanced_buttons3_add_before : "tablecontrols,separator",
 theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print",
 theme_advanced_toolbar_location : "top",
 theme_advanced_toolbar_align : "left",
 theme_advanced_path_location : "bottom",
 plugin_insertdate_dateFormat : "%Y-%m-%d",
 plugin_insertdate_timeFormat : "%H:%M:%S",
 extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
 external_link_list_url : "example_data/example_link_list.js",
 external_image_list_url : "example_data/example_image_list.js",
 flash_external_list_url : "example_data/example_flash_list.js"
});

 

 

-------------------------------------<html:hidden property="productid"/>和<input type="hidden" name="productid"/>的区别-------------------------------------------------------------------------

<html:hidden>要求对应的哦FormBean里必须要有对应的属性,而<input type="hidden"/>则不需要!

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值