- In order to output text in JavaScript you must use write() or writeln().
- Here's an example:
<HTML>
<HEAD>
<TITLE> Welcome to my site</TITLE></HEAD>
<BODY>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
document.write("Welcome to my site!");
// -->
</SCRIPT>
</BODY>
</HTML>
- The difference between write and writeln is: write just outputs a text, writeln outputs the text and a line break.
Note: | The document object write is in lowercase as JavaScript is case sensitive. |
0 comments :
Post a Comment