【问题标题】:How to add comments in Struts tags?如何在 Struts 标签中添加注释?
【发布时间】:2012-09-17 02:02:57
【问题描述】:

我有以下标签,如何在里面添加cmets?

<s:select id="productPrice.product" 
          name="productPrice.product"
          headerKey="0" 
          headerValue="-- Select Product --"
          list="products" 
          listKey="id" 
          listValue="name"
          value="productPrice.product.id"
          theme="simple"
          onchange="getDisplayName(value)"       <!-- How to comment here ? -->
          />

我试过了:

<!-- abc -->
<%-- abc --%>
// abc

它们都不起作用,正确的方法是什么?

【问题讨论】:

  • 我认为不可能在那里添加评论
  • 以及您要添加 cmets 的原因??

标签: struts2 comments


【解决方案1】:

您不能将 cmets 放在标签内。您必须将它们放在 Struts2 标记的上方或下方。 Struts2 标签与 HTML 标签没有什么不同,所以:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-17
    • 1970-01-01
    • 2020-10-10
    • 1970-01-01
    • 2020-11-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多