【发布时间】:2017-08-30 11:04:32
【问题描述】:
我想将我的 html 表格导出为 CSV 文件。有没有简单的代码?用户将使用两个或三个步骤并下载 CSV。
<table>
<thead>
<tr>
<th>1</th>
<th>2</th>
</tr>
</thead>
<tr>
<td rowspan='2'>3</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
</tr>
<tfoot>
<tr>
<th colspan='2'>6 <span style='display:none'> 7
</span> 8</th>
</tr>
</tfoot>
</table>
【问题讨论】:
-
google.co.uk/…你做过研究吗?
-
使用 jQuery 并循环遍历 table 的子项。
-
Arun Vitto 它不是重复的。这个问题与php无关。
-
@Dasma TBF 目前尚不清楚 - 它被标记为两者。 OP 没有指定解决方案应该是 JS 还是 PHP。 OTOH,在我建议谷歌搜索后 2 分钟,他们似乎在网上找到了解决方案。
标签: jquery html-table