因此,作为一个初学者,我不知道如何使用JavaScript创建一个表。我可以使用简单的html文件制作表格,但不能使用Javascript。如何HTML表格转换为Javascript
输出应该有2列和4行。我还需要使用提示标记才能为第二列插入数据。更不用说我需要在第二栏中平均总数。
我试图寻找,但我得到了不同的结果及其混乱me.so请帮我
这是HTML文件
<html>
<body>
<table border="1" style="width:30%">
<tr>
<td>Rose</td>
<td>40</td>
</tr>
<tr>
<td>Daisy</td>
<td>50</td>
</tr>
<tr>
<td>Orchids</td>
<td>60</td>
</tr>
<tr>
<td>Flowers</td>
<td>150</td>
</tr>
</table>
</body>
</html>
你可以参考http://stackoverflow.com/questions/13775519/html-draw-table-using-innerhtml OR http://stackoverflow.com/questions/14643617/create -table-使用JavaScript的 – DimoMohit 2014-09-30 05:52:46