Net-informations.com
SiteMap  | About    

How to Write Your First Program in JavaScript

Hello World

Copy and paste the following HTML code in a file (e.g. Notepad) and save as "first.html" .

After saving the file, double click the "first.html" file.

Then you will get a Message box with the message "Hello, world!!" .

The "Hello, World!" program is a classic and time-honored tradition in computer programming. JavaScript programs can be inserted in any part of an HTML document with the help of the < script > < /script> tag. The < script > tag is used to define a client-side script (JavaScript). The < script > tag alerts the browser program to start interpreting all the text between these tags as a script.

An alert box is often used if you want to make sure information comes through to the user. Here, the alert() method displays an alert box with a specified 'Hello, world!!' message and an OK button.









net-informations.com (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.