OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
3 <form method="POST" action="done.html" onsubmit="return true;" id="testform"> | 3 <form method="POST" action="done.html" onsubmit="return true;" id="testform"> |
4 <input type="text" id="username_field" name="username_field"> | 4 <input type="text" id="username_field" name="username_field"> |
5 <input type="password" id="password_field" name="password_field"> | 5 <input type="password" id="password_field" name="password_field"> |
6 <input type="submit" id="input_submit_button" name="input_submit_button"> | 6 <input type="submit" id="input_submit_button" name="input_submit_button"> |
7 </form> | 7 </form> |
8 | 8 |
9 <button id="submit_button" name="submit_button" | 9 <button id="submit_button" name="submit_button" |
10 onclick="document.getElementById('testform').submit()"> | 10 onclick="document.getElementById('testform').submit()"> |
11 Submit! | 11 Submit! |
12 </button> | 12 </button> |
13 | 13 |
| 14 <a id="link" href="done.html">Go somewhere</a> |
| 15 |
14 <form method="POST" action="done.html" id="testform_no_name"> | 16 <form method="POST" action="done.html" id="testform_no_name"> |
15 <input type="text" id="username_field_no_name"> | 17 <input type="text" id="username_field_no_name"> |
16 <input type="password" id="password_field_no_name"> | 18 <input type="password" id="password_field_no_name"> |
17 <input type="submit" id="input_submit_button_no_name"> | 19 <input type="submit" id="input_submit_button_no_name"> |
18 </form> | 20 </form> |
19 | 21 |
20 <form method="POST" action="done.html" id="testform_elements_no_id"> | 22 <form method="POST" action="done.html" id="testform_elements_no_id"> |
21 <input type="text" name="username_field_no_id"> | 23 <input type="text" name="username_field_no_id"> |
22 <input type="password" name="password_field_no_id"> | 24 <input type="password" name="password_field_no_id"> |
23 <input type="submit" name="input_submit_button_no_id"> | 25 <input type="submit" name="input_submit_button_no_id"> |
24 </form> | 26 </form> |
25 | 27 |
26 <!-- | 28 <!-- |
27 Don't add anything inside this form, and don't change the order of the | 29 Don't add anything inside this form, and don't change the order of the |
28 elements. Because the elements have no "id" or "name" attributes, the test | 30 elements. Because the elements have no "id" or "name" attributes, the test |
29 needs to access them by their offsets in the array of the form children. | 31 needs to access them by their offsets in the array of the form children. |
30 --> | 32 --> |
31 <form method="POST" action="done.html" id="testform_elements_no_id_no_name"> | 33 <form method="POST" action="done.html" id="testform_elements_no_id_no_name"> |
32 <input type="text"> | 34 <input type="text"> |
33 <input type="password"> | 35 <input type="password"> |
34 <input type="submit"> | 36 <input type="submit"> |
35 </form> | 37 </form> |
36 | 38 |
37 </body> | 39 </body> |
38 </html> | 40 </html> |
OLD | NEW |