XMPP JavaScript Library

Add DIV Dynamically to web page using Java Script

JavaScript, Sachin Puri, 2010-04-25 22:01:50

  <TITLE>Add DIV Dynamically to web page using Java Script</TITLE>
    function addDiv()
        var ele=document.createElement('div');
        ele.setAttribute('style','display:block;border:1px solid;height:20px');

  <input type="button" name="cmd" value="Add DIV" onClick="addDiv()"/>

Note: In same way you can add other elements also to web page
Add Your Comment
    Yes! I want to receive all comments by email

  by Anonymous on 27-Feb-2012 01:08 pm
Thanks for the help
  • Reply
  •  2 Like
  •  1 Dislike
  • Report