What is JavaScript

WHAT IS JAVASCRIPT

JavaScript is the scripting language, it is basically used in client side.

This page includes real time scenario’s on JavaScript.


JavaScript is able to Change HTML Content Layout

getElementById() – is one of the most used JavaScript method.

This example describes the use of method to “find” an HTML element (with id=”test”), and changes the element content (innerHTML) to “Active JavaScript”:

Example

document.getElementById(“test”).innerHTML = “Active JavaScript”;

JavaScript Can Modify HTML Styles (CSS)

JavaScript can easily change the look and feel of HTML Layout:

Example

document.getElementById(“test”).style.fontSize = “12px”;

JavaScript is helpful in Validation of Data

JavaScript is often used to validate input:

Please input a number between 1 and 10

NEXT PAGE

Facebooktwittergoogle_plusredditpinterestlinkedinmail
1 Star2 Stars3 Stars4 Stars5 Stars (10 votes, average: 4.80 out of 5)
Loading...