function appendElement()
{
node = document.getElementById('main_div'); // Parent element
tag = "div"; // Your element type
id = "div1"; // element id
html = "<table> <tr> <td> DATA <td> <tr> <table>";
var ne = document.createElement(tag);
if(id) ne.id = id;
if(html) ne.innerHTML = html;
node.appendChild(ne);
}

0 comments:
Post a Comment