August 13, 2009

Learning Javascript 1: Basic Syntax

I am learning Javascript and will keep some posts in this blog as a reference for me to use later on.

Basic Syntax

Always remember to start Javascript with:

tag.

document.write();

Anything that goes inside these two parenthesis will be considered to be written/printed in the display window.
Text inside these lines have to be written with ("Like this for example") but if you are going to display numbers, then these are not needed. Only the parenthesis will be doing that.

for example:
document.write(21356);


changing the document.write to alert will display the same information printed in a popup
alert("for example this");




Technorati Tags: , , , , , , , ,

No comments:

Post a Comment