9

コンパイルされたジェイドを使用してHTMLファイルにチェックボックス入力を入れようとすると、実際のチェックボックスがレンダリングされますが、テキストはレンダリングされません。

          p.confirm
            input(type="checkbox", name="agree") 
              | I agree to the Terms & Conditions of this Company <br />
            input(type="checkbox", name="subscribe") 
              | Tick to recieve future communication from Company

ジェイドのドキュメントを試しましたが、何も起こりません、ありがとう

4

2 に答える 2

23

エスケープされていない場合、ジェイドはテキストをタグとして解釈するため、受け入れられた回答がどのように機能するかわかりません。

代わりに、これらの両方が機能します。

p.confirm
  label
    input(type="checkbox", name="agree")
    | I agree to the Terms & Conditions of this Company
  br
  label
    input(type="checkbox", name="subscribe")
    = " Tick to recieve future communication from Company"

テキストをクリック可能にするには、ラベルが必要です。

于 2013-12-12T13:38:18.640 に答える
3

入力タグには子がありません。

p.confirm
    input(type="checkbox", name="agree")
    I agree to the Terms & Conditions of this Company
    br
    input(type="checkbox", name="subscribe")
    Tick to recieve future communication from Company
于 2012-08-05T15:27:15.870 に答える