Input-output (Definition)

Reading data in and writing data out.

JavaScript was first developed for use in web browsers. Its input and output capabilities in that context are somewhat limited, this mainly being due to the security considerations of allowing a third party to run a script on your computer.

In a web browser implementation, the I/O is limited to being able to access form data, the inner text or HTML of document objects, or perform document writes.

When JavaScript is used server-side, or as a general purpose scripting language for automation, then the implementation adds much more sophisticated I/O capabilities. For example, ScriptEase adds many file and stream based I/O capabilities found in the C language.

See also:Debugging - client side, Debugging - server side, Document.write(), Document.writeln(), Error handling


Wrox Instant JavaScript - page - 13