| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 function test() | 4 function test() |
| 5 { | 5 { |
| 6 if (window.testRunner) | 6 if (window.testRunner) |
| 7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 | 8 |
| 9 var sl = document.getElementById('sl'); | 9 var sl = document.getElementById('sl'); |
| 10 var no = new Option(); | 10 var no = new Option(); |
| 11 no.text = "Test Passed"; | 11 no.text = "Test Passed"; |
| 12 if (sl[0].text == "Test Failed") | 12 if (sl[0].text == "Test Failed") |
| 13 sl[0] = no; | 13 sl[0] = no; |
| 14 document.getElementById('res').innerHTML = sl[0].text; | 14 document.getElementById('res').innerHTML = sl[0].text; |
| 15 } | 15 } |
| 16 </script> | 16 </script> |
| 17 </head> | 17 </head> |
| 18 <body onload="test()"> | 18 <body onload="test()"> |
| 19 This tests that you can index into a select element to get and set an op
tion element.<br> | 19 This tests that you can index into a select element to get and set an op
tion element.<br> |
| 20 <select id="sl" multiple> | 20 <select id="sl" multiple> |
| 21 <option>Test Failed</option> | 21 <option>Test Failed</option> |
| 22 </select> | 22 </select> |
| 23 <div id="res"></div> | 23 <div id="res"></div> |
| 24 </body> | 24 </body> |
| 25 </html> | 25 </html> |
| OLD | NEW |