'createElement()' Example : createElement : Node Operation JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Node Operation » createElement »

 

'createElement()' Example



    
<html>
<body>
<script language="javascript">
function function1(){
   var myElement = document.createElement('<hr>');
   myBody.appendChild(myElement);
}
</script>
<body id="myBody">
<button onClick="function1();">Put horizontal rule</button>
</body>
</html>

    
      
      



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» createElement