Create table from Javascript
-
Hi there, Can you tell me that how can I create a dynamic html table from javascript :confused:
-------------------------------------------------------------------------------------------------- Hiral Shah India If you think that my question is good enough and can be helpful for other then don't forget to vote. :)
-
Hi there, Can you tell me that how can I create a dynamic html table from javascript :confused:
-------------------------------------------------------------------------------------------------- Hiral Shah India If you think that my question is good enough and can be helpful for other then don't forget to vote. :)
-
Hi there, Can you tell me that how can I create a dynamic html table from javascript :confused:
-------------------------------------------------------------------------------------------------- Hiral Shah India If you think that my question is good enough and can be helpful for other then don't forget to vote. :)
hi.. function CreateDynamicTable(noofRows,noofCols) { noofRows =5; noofCols = 5; var str = ""; for(var i=0;i"; } str += ""; } str += "
"; // if u dont have any html contol to load the table then create a div // and attach it to form. var dv; dv = document.createElement('div'); dv.setAttribute('id',"LoadDiv"); //dv.style.backgroundColor = 'Red; dv.innerHTML=str; document.forms[0].appendChild(dv); }
-
hi.. function CreateDynamicTable(noofRows,noofCols) { noofRows =5; noofCols = 5; var str = ""; for(var i=0;i"; } str += ""; } str += "
"; // if u dont have any html contol to load the table then create a div // and attach it to form. var dv; dv = document.createElement('div'); dv.setAttribute('id',"LoadDiv"); //dv.style.backgroundColor = 'Red; dv.innerHTML=str; document.forms[0].appendChild(dv); }
Thank you for the reply. :-D
-------------------------------------------------------------------------------------------------- Hiral Shah India :)