Script

Scripting refers to a series of commands that are interpreted and executed sequentially and immediately on occurance of an event.

There are two types of Scripting language

JAVASCRIPT

Java script is a scripting language that allows you to build dynamic Web page by ensuring maximum user interactivity.
Javascript language is an Object based language,which means that it provides objects for specifying functionality.

History Of Javascript

It was created in 1995 by Brendan Eich while he was an engineer at Netscape. It was originally going to be named LiveScript but was renamed. Unlike most programming languages, JavaScript language has no concept of input or output. It is designed to run as a scripting language in a host environment, and it is up to the host environment to provide mechanisms for communicating with the outside world. The most common host environment is the browser.


Java script version

js_version

How JavaScript makes HTML build website better?


Script Tag

The <script> tag defines a script for an HTML Page to make them interactive


Hello World using Javascript

<html>
<head>
<title>javascript</title>
<script>
document.write("Hello World");
</script>
</head>
<body>
</body>
</html>

Output

javascript

Methods

Javascript allows you to display information using the methods of the document object.The document object is predefined object in javascript,which represents the HTML Page.

<html>
<head>
<title>javascript</title>
<script>
document.write("javascript");
document.writeln("is a scripting ");
document.write("and case sensitive language");
</script>
</head>
<body>
</body>
</html>

Output

javascript

javascript comment

The JavaScript comments are meaningful way to deliver message. It is used to add information about the code, warnings or suggestions so that end user can easily interpret the code.
The JavaScript comment is ignored by the JavaScript engine i.e. embedded in the browser.


Javascript support Two Types of comment


<html>
<head>
<title>javascript</title>
<script>
//using script tag
document.write("javascript");
document.writeln("is a scripting ");
document.write("and case sensitive language");
/*document.write("i am comment");
document.writeln("java script ");
*/
</script>
</head>
<body>
</body>
</html>

Output

javascript