4
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
Code distributed by Google as part of the polymer project is also
9
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
14
<title>iron-form-element-behavior demo</title>
16
<meta charset="utf-8">
17
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
18
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
20
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
22
<link rel="import" href="../../paper-styles/demo-pages.html">
23
<link rel="import" href="simple-form.html">
24
<link rel="import" href="simple-element.html">
34
<div class="vertical-section-container centered">
35
<div class="vertical-section">
36
<form is="simple-form" id="form">
37
Element with iron-form-element-behavior <input is="simple-element" type="text" name="one" value="one">
39
Element without iron-form-element-behavior <input type="text" name="two" value="two">
41
Element with iron-form-element-behavior <input is="simple-element" type="text" name="three" value="three">
44
<h4>Elements tracked by the form: <button onclick="update()">Update</button> </h4>
53
var output = document.getElementById('output');
54
var elements = document.getElementById('form').formElements;
55
document.getElementById('output').innerHTML = '';
56
for (var i = 0; i < elements.length; i++) {
57
var li = document.createElement('li');
58
var text = document.createTextNode(elements[i].value);
60
output.appendChild(li);