Posted By

krisdb on 03/15/07


Tagged

javascript


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


add element


 / Published in: JavaScript
 

  1. function addElement() {
  2. var ni = document.getElementById('');
  3. var divIdName = '';
  4.  
  5. var newdiv = document.createElement('div');
  6.  
  7. newdiv.setAttribute('id',divIdName);
  8. newdiv.innerHTML = '';
  9.  
  10. ni.appendChild(newdiv);
  11. }

Report this snippet  

You need to login to post a comment.