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


JAVASCRIPT DHTML TUTORIALS » Node Operation » insertAdjacentElement »

 

'insertAdjacentElement()' Example



    
<html>
<body>
<script language="JavaScript">
function function1() {
   var myElement = document.createElement('<div style="width:300; height:200; border:solid black 1px;"></div>');
   document.all.myButton.insertAdjacentElement('afterEnd', myElement)

</script>
<button id="myButton" onclick="function1();">Insert element</button>

<div style="width:300; height:200; border:solid black 1px;">www.navioo.com</div>
<div style="width:300; height:200; border:solid black 1px;">www.navioo.com</div>
<div style="width:300; height:200; border:solid black 1px;">www.navioo.com</div>
<div style="width:300; height:200; border:solid black 1px;">www.navioo.com</div>
</body>
</html>

    
      
      



-

Leave a Comment / Note


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

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Node Operation
» insertAdjacentElement