142
rated 0 times
[
147]
[
5]
/ answers: 1 / hits: 65134
/ 13 Years ago, wed, june 8, 2011, 12:00:00
I want to populate a predefined html table using JavaScript:
<table>
<tr>
<th scope=col>ID</th>
<th scope=col>Name</th>
</tr>
<div id='data'/>
</table>
using
document.getElementById('data').innerHTML = ....
But since <div>
is not allowed inside of <table>
above code doesn't work. What is the correct way to achieve this?
More From » html-table