1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"resources/common.js"></script>
8 <p id=
"description"></p>
9 <div id=
"console"></div>
10 <form action=
"javascript: failTest(this)" method=
"get">
11 <input id=
"button1" type=
"submit" formaction=
"javascript: passTest1(this)" />
12 <button id=
"button2" type=
"submit" formaction=
"javascript: passTest2(this)" />
13 <button type=
"submit" formaction=
"javascript: passTest3(this)">
14 <span id=
"span" formaction=
"javascript: failTest2(this)">submit
</span>
18 description("Test for formaction attributes in input and button tags.");
19 var doneAction
= false;
24 testFailed('The formaction attribute in the input or button tag was ignored.');
26 function failTest2(ul
)
29 testFailed('The formaction attribute in the span tag was used.');
31 function passTest1(ul
)
34 testPassed('The formaction attribute in the input tag was used.');
36 function passTest2(ul
)
39 testPassed('The formaction attribute in the button tag was used.');
41 function passTest3(ul
)
44 testPassed('The formaction attribute in the button tag was used.');
48 var input
= document
.getElementById('button1');
51 testFailed('Both of the action and the formaction attributes were ignored.');
55 testFailed('Both of the action and the formaction attributes were ignored.');
58 var button
= document
.getElementById('button2');
61 testFailed('Both of the action and the formaction attributes were ignored.');
64 var span
= document
.getElementById('span');
67 testFailed('Both of the action and the formaction attributes were ignored.');