Wednesday, June 3, 2009

Printing in Javascript - Document.Write

Printing in Javascript is simple and involves the Document.write function. Document.write is used to output any kind of text to the screen, for example.


<script type="text/javascript">
document.write('Hello World');
</script>


Will print a simple "Hello World" to the screen, your most basic program and output using javascript (or any language).

0 comments:

Post a Comment