Javascript

JavaScript is a Scripting Language
JavaScript is most commonly used as a client side scripting language. This means that JavaScript code is written into an HTML page. When a user requests an HTML page with JavaScript in it, the script is sent to the browser and it's up to the browser to do something with it.

The fact that the script is in the HTML page means that your scripts can be seen and copied by whoever views your page. Nonetheless, to my mind this openness is a great advantage, because the flip side is that you can view, study and use any JavaScript you encounter on the WWW.

The JavaScript programming language, developed by Netscape, Inc., is not part of the Java platform. JavaScript, does not create applets or stand-alone applications. In its most common form today, JavaScript resides inside HTML documents, and can provide levels of interactivity to web pages that are not achievable with simple HTML.

A scripting language is a lightweight programming language. JavaScript is programming code that can be inserted into HTML pages. JavaScript inserted into HTML pages, can be executed by all modern web browsers. JavaScript is easy to learn.

Where to place your JavaScript: JavaScript can be placed in the and the sections of an HTML page. The directions that come with your script will tell you where to place the code.

< !DOCTYPE html > < html > 
 * This is an example of JavaScript in the of the document:**



function myFunction {

 document.getElementById("demo").innerHTML = "Paragraph changed.";

}

 < /script >

 < /head > <span style="font-family: Consolas,'courier new'; font-size: 15px;"> <span style="font-family: Consolas,'courier new'; font-size: 15px;"> My Web Page < /h1 > <span style="font-family: Consolas,'courier new'; font-size: 15px;"> A Paragraph < /p > <span style="font-family: Consolas,'courier new'; font-size: 15px;"> < button type= "button" onclick= "myFunction" > Try it < /button > <span style="font-family: Consolas,'courier new'; font-size: 15px;"> < /body >

<span style="font-family: Consolas,'courier new'; font-size: 15px;"> < /html >

=
========================================


 * This is an example of JavaScript in the :**

<span class="highLT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">< <span class="highELE" style="color: #a52a2a; font-family: Consolas,'courier new'; font-size: 15px;">!DOCTYPE <span class="highATT" style="color: #dc143c; font-family: Consolas,'courier new'; font-size: 15px;">html <span class="highGT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">> <span class="highLT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">< <span class="highELE" style="color: #a52a2a; font-family: Consolas,'courier new'; font-size: 15px;">html <span class="highGT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">> <span class="highLT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">< <span class="highELE" style="color: #a52a2a; font-family: Consolas,'courier new'; font-size: 15px;">body <span class="highGT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">> <span class="highLT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">< <span class="highELE" style="color: #a52a2a; font-family: Consolas,'courier new'; font-size: 15px;">script <span class="highATT" style="color: #dc143c; font-family: Consolas,'courier new'; font-size: 15px;">src= <span class="highVAL" style="color: #0000cd; font-family: Consolas,'courier new'; font-size: 15px;">"myScript.js" <span class="highGT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">> <span class="highLT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">< <span class="highELE" style="color: #a52a2a; font-family: Consolas,'courier new'; font-size: 15px;">/script <span class="highGT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">> <span class="highLT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">< <span class="highELE" style="color: #a52a2a; font-family: Consolas,'courier new'; font-size: 15px;">/body <span class="highGT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">> <span class="highLT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">< <span class="highELE" style="color: #a52a2a; font-family: Consolas,'courier new'; font-size: 15px;">/html <span class="highGT" style="color: #0000ff; font-family: Consolas,'courier new'; font-size: 15px;">>