Append contents to a DOM element - Node.js DOM

Node.js examples for DOM:Element

Description

Append contents to a DOM element

Demo Code

function append(name, content) {
  if(name != null) {
    var div = window.document.getElementById(name);
    div.innerHTML = div.innerHTML + content;
  } else {/*from  www .  jav a  2s . c  om*/
    return false;
  }
}

Related Tutorials