| OLD | NEW |
| (Empty) |
| 1 <select id="sel1" disabled="disabled"> | |
| 2 <option selected="selected">FAIL</option> | |
| 3 <option>PASS</option> | |
| 4 </select><br> | |
| 5 <select id="sel2" disabled="disabled"> | |
| 6 <option selected="selected">FAIL</option> | |
| 7 <option>PASS</option> | |
| 8 </select><br> | |
| 9 | |
| 10 <select id="sel3"> | |
| 11 <option selected="selected">FAIL</option> | |
| 12 <option disabled="disabled">PASS</option> | |
| 13 </select><br> | |
| 14 <select id="sel4"> | |
| 15 <option selected="selected">FAIL</option> | |
| 16 <option disabled="disabled">PASS</option> | |
| 17 </select><br> | |
| 18 | |
| 19 <select id="sel5" size="2" disabled="disabled"> | |
| 20 <option selected="selected">FAIL</option> | |
| 21 <option>PASS</option> | |
| 22 </select><br> | |
| 23 <select id="sel6" size="2" disabled="disabled"> | |
| 24 <option selected="selected">FAIL</option> | |
| 25 <option>PASS</option> | |
| 26 </select><br> | |
| 27 | |
| 28 <select id="sel7" size="2"> | |
| 29 <option selected="selected">FAIL</option> | |
| 30 <option disabled="disabled">PASS</option> | |
| 31 </select><br> | |
| 32 <select id="sel8" size="2"> | |
| 33 <option selected="selected">FAIL</option> | |
| 34 <option disabled="disabled">PASS</option> | |
| 35 </select><br> | |
| 36 | |
| 37 | |
| 38 <script> | |
| 39 | |
| 40 var sel1 = document.getElementById("sel1"); | |
| 41 sel1.options[1].selected = true; | |
| 42 | |
| 43 if (sel1.selectedIndex == 1) | |
| 44 document.write("PASS: sel1 correctly set to selectedIndex 1 by sel1.options[
1].selected = true.<br>"); | |
| 45 else | |
| 46 document.write("FAIL: sel1 set to selectedIndex " + sel1.selectedIndex + " i
nstead of 1 by sel1.options[1].selected = true.<br>"); | |
| 47 | |
| 48 var sel2 = document.getElementById("sel2"); | |
| 49 sel2.selectedIndex = 1; | |
| 50 | |
| 51 if (sel2.selectedIndex == 1) | |
| 52 document.write("PASS: sel2 correctly set to selectedIndex 1 by sel2.selected
Index = 1.<br>"); | |
| 53 else | |
| 54 document.write("FAIL: sel2 set to selectedIndex " + sel2.selectedIndex + " i
nstead of 1 by sel2.selectedIndex = 1.<br>"); | |
| 55 | |
| 56 var sel3 = document.getElementById("sel3"); | |
| 57 sel3.options[1].selected = true; | |
| 58 | |
| 59 if (sel3.selectedIndex == 1) | |
| 60 document.write("PASS: sel3 correctly set to selectedIndex 1 by sel3.options[
1].selected = true.<br>"); | |
| 61 else | |
| 62 document.write("FAIL: sel3 set to selectedIndex " + sel3.selectedIndex + " i
nstead of 1 by sel3.options[1].selected = true.<br>"); | |
| 63 | |
| 64 var sel4 = document.getElementById("sel4"); | |
| 65 sel4.selectedIndex = 1; | |
| 66 | |
| 67 if (sel4.selectedIndex == 1) | |
| 68 document.write("PASS: sel4 correctly set to selectedIndex 1 by sel4.selected
Index = 1.<br>"); | |
| 69 else | |
| 70 document.write("FAIL: sel4 set to selectedIndex " + sel4.selectedIndex + " i
nstead of 1 by sel4.selectedIndex = 1.<br>"); | |
| 71 | |
| 72 | |
| 73 var sel5 = document.getElementById("sel5"); | |
| 74 sel5.options[1].selected = true; | |
| 75 | |
| 76 if (sel5.selectedIndex == 1) | |
| 77 document.write("PASS: sel5 correctly set to selectedIndex 1 by sel5.options[
1].selected = true.<br>"); | |
| 78 else | |
| 79 document.write("FAIL: sel5 set to selectedIndex " + sel5.selectedIndex + " i
nstead of 1 by sel5.options[1].selected = true.<br>"); | |
| 80 | |
| 81 var sel6 = document.getElementById("sel6"); | |
| 82 sel6.selectedIndex = 1; | |
| 83 | |
| 84 if (sel6.selectedIndex == 1) | |
| 85 document.write("PASS: sel6 correctly set to selectedIndex 1 by sel6.selected
Index = 1.<br>"); | |
| 86 else | |
| 87 document.write("FAIL: sel6 set to selectedIndex " + sel6.selectedIndex + " i
nstead of 1 by sel6.selectedIndex = 1.<br>"); | |
| 88 | |
| 89 var sel7 = document.getElementById("sel7"); | |
| 90 sel7.options[1].selected = true; | |
| 91 | |
| 92 if (sel7.selectedIndex == 1) | |
| 93 document.write("PASS: sel7 correctly set to selectedIndex 1 by sel7.options[
1].selected = true.<br>"); | |
| 94 else | |
| 95 document.write("FAIL: sel7 set to selectedIndex " + sel7.selectedIndex + " i
nstead of 1 by sel7.options[1].selected = true.<br>"); | |
| 96 | |
| 97 var sel8 = document.getElementById("sel8"); | |
| 98 sel8.selectedIndex = 1; | |
| 99 | |
| 100 if (sel8.selectedIndex == 1) | |
| 101 document.write("PASS: sel8 correctly set to selectedIndex 1 by sel8.selected
Index = 1.<br>"); | |
| 102 else | |
| 103 document.write("FAIL: sel8 set to selectedIndex " + sel8.selectedIndex + " i
nstead of 1 by sel8.selectedIndex = 1.<br>"); | |
| 104 | |
| 105 </script> | |
| OLD | NEW |