The document.writeln() method is very similar to the document.write() method. The difference is that document.writeln() will place a carriage return after the written value.
This is of little consequence when writing HTML because the browser ignores any line breaks in the HTML.
However, it can be useful when writing other kinds of output such as plain text for example.
The DOM level 1 specification suggests that this method may be deprecated in the future.
Prev | Home | Next |
Document.write() | Up | DocumentEvent |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |