1

http://blog.sethladd.com/2013/09/forms-http-servers-and-polymer-with-dart.htmlで Seth Ladd のブログを読んでいました。

手順 3 と 4 を繰り返して別の Form コンポーネント (Form2) を追加し、手順 5 で Form2 をインポートするとします。手順 5 は次のコードのようになります。

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <title>Sample app</title>
    <link rel="stylesheet" href="parse_form_submit.css">
    <link rel="import" href="person_form.html">
    <script src="packages/polymer/boot.js"></script>
 </head>
 <body>
   <h1>Forms</h1>

<!-- Due to a bug in polymer, we can't use custom attributes.
     See https://code.google.com/p/dart/issues/detail?id=12262
     <person-form action="http://localhost:8888/submit"></person-form>
-->

<!-- in the meantime -->
    <person-form></person-form>
    <form-2><form-2>

  </body>
</html>

「送信」ボタンは、フォームの 1 つまたはフォームがインポートされる親のどこに配置する必要がありますか? どちらの場合も、送信ボタンがクリックされたときに htnl5 による自動検証などを取得するにはどうすればよいですか? タグ内に独自の送信ボタンを含む単一のフォームではすべてが正常に機能しますが、送信ボタンがタグの外部に配置されている場合はそうではありません。

ありがとう

4

1 に答える 1