Display Ads On This Blog

Banner Ads on scriptforphp.blogspot.com
Provides free php script for php developer.
Prix: € 5.00

Friday, April 10, 2009

Add dynamic element in javascript

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