What is Javascript?
JavaScript is a dynamic computer programming language used to make web pages interactive. Its interpreter is embedded in web browser software, such as IE, Chrome, and Firefox, etc. It runs on the visitor’s computer and browser.
The syntax of JavaScript looks like this:
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<html> <head> <title>Hello World</title> </head> <body> <script language="javascript"> alert("Hello World!"); </script> </body> </html> |
Output
Hello World!
Explanation
<script type="text/javascript">
is a tag for JavaScript. The JavaScript codes are included within it. “alert” pops up an alert box displaying a message.