首先html里面,这个class我是基于layui的一个东西做的
<table class="layui-table" id="choiceTable">
<thead>
<tr align="center" class="table_header" height="22">
<th style="width: 10%; text-align: center">编号</th>
<th style="width: 45%; text-align: center">名称</th>
<th style="width: 10%; text-align: center">分值</th>
<th style="width: 40%; text-align: center">子选项</th>
</tr>
</thead>
<tbody id="ChoiceList" bgcolor="#D7EBFF" align="center" style="color: black">
</tbody>
</table>
然后js里面
$.post(
"url",
{
传参
},
function(data) {
var data = JSON.parse(data);