- DOM stands for Document Object Module and also known as DTML
- DOM will interact to document to document and create dynamic contents are elements with in document
- DOM can also support popup events and validating the user in puts in form
- DOM will control the user on web page
- Every browser has won stands in DOM
- DOM supports to create user objects
- JS is a object based language
- Object is compound data type and store variables functions
<html>
<head>
<script
language="javascript">
function
test1(){
var
a=document.createElement("h1");
var
b=document.createTextNode("New Content");
a.appendChild(b);
document.body.appendChild(a);
}
</script>
</head>
<body>
<input
type='button' value='Create Element' onclick="test1()"/>
</body>
</html>
No comments:
Post a Comment