- 1

How to add a table in javascript?

Please help me guys.

4th Aug 2017, 12:50 PM
Hermaine Catherine
Hermaine Catherine - avatar
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 ^^
4th Aug 2017, 2:55 PM
visph
visph - avatar
+ 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>
4th Aug 2017, 1:24 PM
visph
visph - avatar
+ 2
thank you so much.
4th Aug 2017, 2:45 PM
Hermaine Catherine
Hermaine Catherine - avatar
+ 1
how about the <ol> tag? how can i put a list inside the javascript?
4th Aug 2017, 2:47 PM
Hermaine Catherine
Hermaine Catherine - avatar