Sunday, January 10, 2010

JavaScript

Sunday, January 10, 2010
JavaScript; people usually mistake it as same as Java programming language. Actually, both of Java and JavaScript are completely different. JavaScript is in fact another programming or computer language which is used to make the web pages interactive to users.

There is no special program required for you to be able to create usable code. Any plain text editor such as Notepad is quite satisfactory for being able to write JavaScript. For a beginning, let us try writing some code to look at. :)

1) Open the Notepad or any other text editor.
2) Write the code as below (Remember that JavaScript must always have the 'script' tags):



3) Save it as test.html.
4) Try to run the file in any browser. Would you get it appear like this?



See, the pop-up box appears as the result of the JavaScript code.

So, that is an example of how interactive a web page can be. :)

0 comments:

Post a Comment

 
@Chiq & Stuff © 2008. Design by Pocket