| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script language="javascript"> | |
| 4 function print(message) | |
| 5 { | |
| 6 var paragraph = document.createElement("p"); | |
| 7 paragraph.appendChild(document.createTextNode(message)); | |
| 8 document.getElementById("console").appendChild(paragraph); | |
| 9 } | |
| 10 function test() | |
| 11 { | |
| 12 if(window.testRunner) | |
| 13 testRunner.dumpAsText(); | |
| 14 | |
| 15 labelInsideForm = document.getElementById("labelInsideForm"); | |
| 16 labelNotInsideForm = document.getElementById("labelNotInsideForm"); | |
| 17 | |
| 18 form = document.getElementById("form"); | |
| 19 | |
| 20 if(labelInsideForm.form == form) | |
| 21 print("Passed"); | |
| 22 else | |
| 23 print("Failed"); | |
| 24 | |
| 25 if(labelNotInsideForm.form == null) | |
| 26 print("Passed"); | |
| 27 else | |
| 28 print("Failed"); | |
| 29 } | |
| 30 </script> | |
| 31 </head> | |
| 32 | |
| 33 <body onload="test();"> | |
| 34 <p>This test attempts to access an HTMLLabelElement's form property. The
first test accesses the form property of an label which is inside of a form. T
he second test accesses the form property of an label which is not inside of a f
orm</p> | |
| 35 | |
| 36 <div id="console"></div> | |
| 37 | |
| 38 <form id="form"> | |
| 39 <label id="labelInsideForm"> | |
| 40 </label> | |
| 41 </form> | |
| 42 | |
| 43 <label id="labelNotInsideForm"> | |
| 44 </label> | |
| 45 </body> | |
| 46 </html> | |
| OLD | NEW |