1 Answers

Rahul Roi
Rahul Roi

Where the javascript is a client-side as well as a server-side scripting language that can be inserted into HTML pages and is understood by web browsers. The JavaScript is also an Object-based Programming language.


<script type='text/javascript'>
 function addNode() { var newP = document.createElement('p');
 var textNode = document.createTextNode(' This is a new text node');
 newP.appendChild(textNode); document.getElementById('firstP').appendChild(newP); }
</script> </head>
<body> <p id='firstP'>firstP<p> </body>