java Script

javaScript is a Programming Language For validating HTML Pages.


< script type="text/javascript" >
document.getelementById("new1").innerHTML = "My First JS Program";
< /script >

JS Functions

In javaScript mainly functions are specified using a keyword as "function" .


The Declaration of a function can be done by function or by expression.

< script type="text/javascript" >
function functionName(x,y) {
return x + y;
}
< /script >
var a = function(l,n) {
return x + y;
}

JS Objects

In javaScript Every thing represent as an object .

Booleans can also be as objects.

Numbers can be objects.

Dates are always.

Arrays are also objects.

var Names = {
firstName: "Tommy",
lastName: "john",
age:, "25",
height: "5.8",
};

JS HTML DOM

The HTML DOM document object is the specified owner of all other objects in any web page .

Finding sn HTML ELement as .

document.getElementById(id).
document.getElementByTagName(name).
document.getElementByName(name).

var x document.getElementByTagName("p").

Javascript schematic.


< !DOCTYPE html >
< html >
< body >
< button type "button" >
onclick ="document.getElementById("").InnerHTML = Date();" >
< p >
id= "demo"
< /p >
< /body >
< /html />