![]() |
An indroduction to javascript
Indroduction
JavaScript is one of the most used Web based language.JavaScript (js) is the continuation of HTML (Hyper text markup language). There are many uses and (of course abuses) of javascript language.Here are few things that you may or may not seen in your web serfing areas
Writing javascript Javascript program usually written on Specially text editors.Some kind of text editors are specialy build for writting HTML languages. Usually notepad,word pad are used in writing Javascript enabled files.Some text editors like G-edit are used in linux platform. After writing the HTML/javascript based files you must remember to save the text as HTML ie If your HTML file name is “index” save it as index.html.Viewing html based programmes is not a difficult task. You must have a web browser such as Windows explorer,Mozilla firefox ect So first up all lets look into a sample html programm Quote:
Output of programm will be:-Hello world Exploring javascript Let’s find out how it works
|
Re: An indroduction to javascript
JavaScript is a scripting language used to make interactiveweb pages .It also known as LiveScript,
JavaScript developed by Netscape with the trademark of sunmicrosystem. In Javascript we uses functions and the Functions can be defined in the <head> section and in the <body> section of a HTML document. Javascript provide the following way for implement. Code:
<html> |
Re: An indroduction to javascript
IF COMMENT IN JAVASCRIPT
usualy if and if else comments are used in c/c++ languages the if statement is away to make desitions based on variable or some type of data if programm in javascript Quote:
|
Re: An indroduction to javascript
Quote:
|
Re: An indroduction to javascript
Loops
Loops are text printing from an integer to its next number eg 1 to 100 while loop There are two parts to javascript while loop *The conitional statements must be true for while loop's code to be executed *The while loop codes that condain curley brases {} Will be executedif condition is true When while loop begins in javascript interpreter cheakes cheaks the condition statement is true then its executed[QUOTE]<html> Quote:
Quote:
|
| All times are GMT +5.5. The time now is 16:51. |