Hi friends,
I have attached the coding for passing the value from a textbox to a table. Like this, i would like to know on how to add multiple textbox in multiple fields in one table?
<html>
<head>
<script>
function addToTable() {
var value = document.getElementById("txtBox").value;
var tr = document.createElement("TR");
var td = document.createElement("TD");
var td1 = document.createElement("TD");
var td_value = document.createTextNode(value);
td.appendChild(td_value);
tr.appendChild(td);
document.getElementById('tb').appendChild(tr);
}
</script>
</head>
<body>
<input type="text" name="txtBox" id="txtBox"/>
<button onClick="addToTable()">add</button>
<table border=2>
<tbody id="tb">
<th>List</th>
<th>Name</th>
</tbody>
</table>
Thanks in advance