Creates a dom element - Node.js DOM

Node.js examples for DOM:Element

Description

Creates a dom element

Demo Code

function createElement(x, y) {
  x = document.createElement(x);// w  w  w.  j  a  v  a2 s  . co  m
  x.innerHTML = y;
  return x;
}

Related Tutorials