1 Hello world output Tue Jun 16, 2009 11:08 am
Admin
Administrator
This tutorial is to basically show you how to output text to the browser using javascript
Example:
<script type="text/javascript"> - This means that anything enclosed in this is javascript code
document.write("Hello World"); - Document is an object that refers the the web page. write is a method that means you want to write to the object. Whatever is defined in the parenthesis means that you want to write that to the object.
</script> - this just tells the web page that you are done defining you javascript code.
Example:
- Code:
<script type="text/javascript">
document.write("Hello World");
</script>
<script type="text/javascript"> - This means that anything enclosed in this is javascript code
document.write("Hello World"); - Document is an object that refers the the web page. write is a method that means you want to write to the object. Whatever is defined in the parenthesis means that you want to write that to the object.
</script> - this just tells the web page that you are done defining you javascript code.