| Author: Kundan Kumar Sinha 08 Sep 2008 | Member Level: Gold | Rating: Points: 3 |
Hi,
Use one div tag to display the table, and create four javascript function. call corresponding function on the click of corresponding button.
one function is added for your reference.
function ShowTable() { var show = document.getElementById("table"); var tableHead = "<Table Border='1' width='100%'>"; var tableBottom = "</table>";var tableBody=""; var j; j = document.frm1.txtValue.value; for(var i = 0; i < j; i++) { tableBody = tableBody + "<tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr>"; } show.innerHTML = tableHead + tableBody + tableBottom ; }
You can refer the following link for detail information.
http://dotnetspider.com/resources/20542-Ceate-Table-Dynamically-Using-Javascript.aspx
Regards, Kundan
|