3 function extractValues()
5 var rows
= document
.getElementById("table").rows
;
6 for (var i
= 0; i
< rows
.length
; i
++) {
8 var element
= row
.childNodes
[1].firstChild
;
11 row
.childNodes
[2].innerHTML
= element
.value
;
13 if (element
.getAttribute("value")) {
14 row
.childNodes
[3].innerHTML
= element
.getAttribute("value");
16 } catch (exception
) { }
24 document
.getElementById("1").value
= "after";
25 document
.getElementById("9").value
= "after";
26 document
.getElementById("2").value
= "after";
27 document
.getElementById("5").value
= "after";
28 document
.getElementById("6").value
= "after";
29 document
.getElementById("7").value
= "after";
30 document
.getElementById("8").value
= "after";
32 document
.getElementById("3").setAttribute("value", "after");
33 document
.getElementById("4").setAttribute("value", "after");
36 e
= document
.getElementById("12");
39 } catch (exception
) { }
42 e
= document
.getElementById("13");
45 } catch (exception
) { }
48 e
= document
.getElementById("14");
49 e
.setAttribute("value", "after");
51 } catch (exception
) { }
54 e
= document
.getElementById("15");
55 e
.setAttribute("value", "after");
57 } catch (exception
) { }
60 document
.getElementById("10").value
= "after";
61 } catch (exception
) { }
65 document
.getElementById("form").reset();
70 <body onload=
"test()">
72 <p>Results that match WinIE are two columns on the right that say
"after" every time, except for the last row which should have nothing in either column.
</p>
73 <p>Results that match Gecko are like WinIE, but with
"before" for the attribute in the first two rows and the last row.
</p>
81 <thead><th align=
"left">test case
</th><th align=
"left">form element
</th><th>property
</th><th>attribute
</th></thead>
83 <tr><td>text with value property changed
</td><td><input id=
"1" value=
"before"></td><td ></td><td></td></tr>
84 <tr><td>password with value property changed
</td><td><input id=
"9" type=
"password" value=
"before"></td><td></td><td></td></tr>
85 <tr><td>check box with value property changed
</td><td><input id=
"2" type=
"checkbox" value=
"before"></td><td></td><td></td></tr>
86 <tr><td>hidden with value property changed
</td><td><input id=
"5" type=
"hidden" value=
"before"></td><td></td><td></td></tr>
87 <tr><td>button with value property changed
</td><td><input id=
"6" type=
"button" value=
"before"></td><td></td><td></td></tr>
88 <tr><td>image with value property changed
</td><td><input id=
"7" type=
"image" value=
"before"></td><td></td><td></td></tr>
89 <tr><td>radio with value property changed
</td><td><input id=
"8" type=
"radio" value=
"before"></td><td></td><td></td></tr>
91 <tr><td>text with value attribute changed
</td><td><input id=
"3" value=
"before"></td><td ></td><td></td></tr>
92 <tr><td>check box with value attribute changed
</td><td><input id=
"4" type=
"checkbox" value=
"before"></td><td></td><td></td></tr>
94 <tr><td>text with value property changed, then turned into check box
</td><td><input id=
"12" value=
"before"></td><td ></td><td></td></tr>
95 <tr><td>check box with value property changed, then turned into text
</td><td><input id=
"13" type=
"checkbox" value=
"before"></td><td></td><td></td></tr>
97 <tr><td>text with value attribute changed, then turned into check box
</td><td><input id=
"14" value=
"before"></td><td ></td><td></td></tr>
98 <tr><td>check box with value attribute changed, then turned into text
</td><td><input id=
"15" type=
"checkbox" value=
"before"></td><td></td><td></td></tr>
100 <tr><td>file with value property changed
</td><td><input id=
"10" type=
"file" value=
"before"></td><td></td><td></td></tr>