我有一个复选框来同意内容的条款和条件,用户想要在标签中链接的条款。我试着做这样的事:
<s:checkbox name="iagree" fieldValue="true" label="By entering, I acknowledge that I have read, understand, and agree to the
<a href='/rules.pdf'>Official Rules</a>, <a href='/about-us/terms-of-use/'>Terms of Use</a>, and <a href='/about-us/privacy-policy/'>Privacy Policy</a>."/>
不幸的是,JSP正在转义我的标记,所以您实际上看到了括号、标记等。我是否可以添加一个属性来确保HTML实际上被用作HTML?
奇怪的是,我有一个struts无线电组,它允许标记很好。
发布于 2013-10-11 18:00:29
只需使用HTML标签,并将复选框与文本和链接放在其中。并使用simple
主题作为<s:checkbox>
标记。
<label>
<s:checkbox name="iagree" fieldValue="true" theme="simple"/>
By entering, I acknowledge that I have read, understand, and agree to the
<a href='/rules.pdf'>Official Rules</a>,
<a href='/about-us/terms-of-use/'>Terms of Use</a>,
and <a href='/about-us/privacy-policy/'>Privacy Policy</a>.
</label>
https://stackoverflow.com/questions/19324332
复制相似问题