0

コンテンツの条件に同意するためのチェックボックスがあり、ユーザーはラベルにリンクされた条件を望んでいます。私はこのようなことをしようとしました:

<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 ラジオ グループを持っており、マークアップを問題なく許可しています。

4

1 に答える 1

1

HTML<label>タグを使用して、チェックボックスをテキストとリンクとともに配置するだけです。そして、タグ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>
于 2013-10-11T18:00:29.607 に答える