What Is Scripting ?
- Scripting refers to a series of commands that are interpreted and executed sequentially and immediately on occurrence of an event.
- This event is an action generated by a user while interacting with a Web page.
- Examples of events include button clicks, selecting a product from a menu, and so on.
- A scripting language refers to a set of instructions that provides some functionality when the user interacts with a Web page.
- Scripting languages are often embedded in the HTML pages to change the behavior of the Web pages according to the user’s requirements.
There are 2 Types of Scripting Languages
- Client-Side Scripting
- Server-Side Scripting
Client-Side Scripting
Refers to a script being executed on the client’s machine by the browser.
Server-Side Scripting
Refers to a script being executed on a Web server to generate dynamic HTML pages.
JavaScript – Client-Side Scripting
- JavaScript is a scripting language that allows building dynamic Web pages by ensuring maximum user interactivity.
- JavaScript language is an object-based language, which means that it provides objects for specifying functionalities.
- In real life, an object is a visible entity such as a car or a table having some characteristics and capable of performing certain actions.
- Similarly, in a scripting language, an object has a unique identity, state, and behavior.
- The identity of the object distinguishes it from the other objects of the same type.
- The state of the object refers to its characteristics, whereas the behavior of the object consists of its possible actions.
- The object stores its identity and state in fields (also called variables) and exposes its behavior through functions (actions).

Versions Of JavaScript
The first version of JavaScript was developed by Brendan Eich at Netscape in 1995 and was named JavaScript 1.0.
Following table lists the various versions of JavaScript language
Version | Description |
1.1 | Is supported from 3.0 version of the Netscape Navigator and Internet Explorer. |
1.2 | Is supported by the Internet Explorer from version 4.0 |
1.3 | Is supported by the Internet Explorer from version 5.0, Netscape Navigator from version 4.0, and Opera from version 5.0. |
1.4 | Is supported by servers of Netscape and Opera 6. |
1.5 | Is supported by the Internet Explorer from version 6.0, Netscape Navigator from version 6.0, and Mozilla Firefox from version 1.0. |
1.6 | Is supported in the latest versions of the Internet Explorer and Netscape Navigator browsers. It is also supported by Mozilla Firefox from version 1.5. |
1.7 | Is supported in the latest versions of the Internet Explorer and Netscape Navigator browsers. It is also supported by Mozilla Firefox from version 2.0. |
Client Side JavaScript (CSJS)
- A Client-side JavaScript (CSJS) is executed by the browser on the user’s workstation.
- A client-side script might contain instructions for the browser to handle user interactivity.
- These instructions might be to change the look or content of the Web page based on the user inputs.
- Examples include displaying a welcome page with the user name, displaying date and time, validating that the required user details are filled, and so on.
- A JavaScript is either embedded in an HTML page or is separately defined in a file, which is saved with .js extension.
- In client-side scripting, when an HTML is requested, the Web server sends all the required files to the user’s computer.
- The Web browser executes the script and displays the HTML page to the user along with any tangible output of the script.
Server Side JavaScript (SSJS)
- A Server-side JavaScript (SSJS) is executed by the Web server when an HTML page is requested by a user and the output is displayed by the browser.
- A server-side JavaScript can interact with the database, fetch the required information specific to the user, and display it to the user.
- Server-side scripting fulfills the goal of providing dynamic content in Web pages.
- Unlike client-side JavaScript, HTML pages using server-side JavaScript are compiled into bytecode files on the server.
- A JavaScript is either embedded in an HTML page or is separately defined in a file, which is saved with .js extension.
- Compilation is a process of converting the code into machine-independent code.
- This machine-independent code is known as the bytecode, which is an executable file that the Web server runs to generate the desired output.
Information About <Script> Tag
- The <script> tag defines a script for an HTML page to make them interactive.
- The browser that supports scripts interprets and executes the script specified under the <script> tag when the page loads in the browser.
- You can directly insert a JavaScript code under the <script> tag.
- You can define multiple <script> tags either in the <head> or in the <body> elements of an HTML page.
- In HTML5, the type attribute specifying the scripting language is no longer required as it is optional
The Code Snippet demonstrates the use of the <script> tag
<!doctype html>
<html>
<head>
<script>
document.write(“Welcome to the Digital World”);
</script>
</head>
<body>
.....
</body>
</html>
Click Below Link to Download Notes Of This Blog
https://www.mediafire.com/file/fh6n90nekeartc2/INTRODUCTION+TO+JAVASCRIPT.docx/file
No responses yet