| <html> | |
| <head> | |
| <script> | |
| function test() | |
| { | |
| if (window.testRunner) | |
| testRunner.dumpAsText(); | |
| var sl = document.getElementById('sl'); | |
| var no = new Option(); | |
| no.text = "Test Passed"; | |
| if (sl[0].text == "Test Failed") | |
| sl[0] = no; | |
| document.getElementById('res').innerHTML = sl[0].text; | |
| } | |
| </script> | |
| </head> | |
| <body onload="test()"> | |
| This tests that you can index into a select element to get and set an option element.<br> | |
| <select id="sl" multiple> | |
| <option>Test Failed</option> | |
| </select> | |
| <div id="res"></div> | |
| </body> | |
| </html> |