4 <script src=
"../../resources/js-test.js"></script>
6 <p>Test formmethod attribute
</p>
8 <form id=f1
method=
"post">
9 <input type=
"submit" value=
"Submit" id=
"ip1">
10 <input type=
"submit" formmethod=
"" value=
"Submit" id=
"ip2">
11 <input type=
"submit" formmethod=
"post" value=
"Submit" id=
"ip3">
12 <input type=
"submit" formmethod=
"get" value=
"Submit" id=
"ip4">
13 <input type=
"submit" formmethod=
"foo" value=
"Submit" id=
"ip5">
15 <div id=console
></div>
17 var form1
= document
.getElementById('f1');
19 debug('Missing value');
20 var ip1
= document
.getElementById('ip1');
21 shouldBeEqualToString("ip1.formMethod","");
22 shouldBeNull("ip1.getAttribute('formmethod')");
26 var ip2
= document
.getElementById('ip2');
27 shouldBeEqualToString("ip2.formMethod", "get");
28 shouldBeEqualToString("ip2.getAttribute('formmethod')", "");
32 var ip3
= document
.getElementById('ip3');
33 shouldBeEqualToString("ip3.formMethod", "post");
34 shouldBeEqualToString("ip3.getAttribute('formmethod')", "post");
38 var ip4
= document
.getElementById('ip4');
39 shouldBeEqualToString("ip4.formMethod", "get");
40 shouldBeEqualToString("ip4.getAttribute('formmethod')", "get");
43 debug('Invalid value');
44 var ip5
= document
.getElementById('ip5');
45 shouldBeEqualToString("ip5.formMethod", "get");
46 shouldBeEqualToString("ip5.getAttribute('formmethod')", "foo");