- 1
How to add a table in javascript?
Please help me guys.
4 Answers
+ 4
Why javascript?
Your question initially was not talking about it ^^
If you mean in html code source:
<ol> <!-- the root/parent list element -->
<li>item</li>
<li>item</li>
<li>item</li>
</ol>
If you really ask about javascript, there's many ways, starting by just writing the right html code dynamically in the document (whole or targeting a specific element content) embeding (or linking) the javascript code ^^
+ 6
<table> <!-- the root/parent table element>
<tr> <!-- how many Table Row elements as lines needed -->
<td>cell content</td> <!-- how many Table Data (cell) elements as needed on each line -->
<td>cell content</td> <!-- mandatory to have same count of cell in each row of a single table -->
<td>cell content</td> <!-- however merging (spaning) cells is possible -->
</tr>
<tr>
<td colspan="2">cell content spanned with right next cell</td>
<!-- <td>cell content</td> cell merged with previous one must be retrieved -->
<td rowspan="2">cell content spanned with next row cell on corresponding column</td>
</tr>
<tr>
<td>cell content</td>
<td>cell content</td>
<!-- <td>cell content</td> retrieved, as this cell is merged with previous row one -->
</tr>
</table>
+ 2
thank you so much.
+ 1
how about the <ol> tag? how can i put a list inside the javascript?