| <script type="text/javascript"> |
| var paragraph = document.createElement("li"); |
| paragraph.appendChild(document.createTextNode(message)); |
| document.getElementById("console").appendChild(paragraph); |
| var elt = document.getElementById("text"); |
| elt.defaultValue = "\ntesting"; |
| compare(elt.defaultValue, "\ntesting"); |
| elt.defaultValue = "\n\ntesting"; |
| compare(elt.defaultValue, "\n\ntesting"); |
| elt.defaultValue = "\n\n\ntesting"; |
| compare(elt.defaultValue, "\n\n\ntesting"); |
| function compare(val, exp) |
| <p>This test attempts to set a leading newline in a text area's default value.</p> |
| <p>If the test passes, you should see a 3 lines saying "Passed" below.</p> |
| <textarea id="text"></textarea> |
| <p><ol id="console"></ol></p> |