Define JavaScript

DHTML stands for Dynamic HTML, it is not any one specific technology, it is a group of technologies including HTML, CSS, JavaScript, VB Script, Document Object Model (DOM) and many more.

JavaScript is a scripting language commonly used to build dynamic and interactive websites. JavaScript was developed by Brendan Eich in 1995, at Netscape Communications Corporation. JavaScript is a client-side scripting language, means the source code is processed on client's web browser rather than on the web server. JavaScript is use to program the behavior of web pages. In HTML, JavaScript must be inserted between opening <script> tag and an closing </script> tag, and it can be put in the <body> or in the <head> section of an HTML page. JavaScript is the default scripting language in all modern browsers and it is case sensitive language.

JavaScript is one of the 3 languages all web designer must learn:

  1. HTML to define the content of web pages.
  2. CSS to specify the layout of web pages.
  3. JavaScript to program the behavior of web pages.

JavaScript - Script Tag

The HTML <script> tag is used to include either external script file or to define internal script for the HTML document. Following are the examples, which helps you how to apply JavaScript in HTML file.

Example 1: Display My First JavaScript Function on Button Click.

Example 2: Display Hello JavaScript on Button Click in Same Document.

Example 3: Input username and display with hello message.

Example 4: Input 2 numbers and find sum.