我的页面上方有一个表格
<form method="post" id="rrrform">
<table class="table table-bordered" id="myTable">
<thead>
<tr>
<th>R400</th>
<th>R401</th>
</tr>
</thead>
<tbody>
{% for item in obj %}
<tr>
<td name="r400">{{ item.r400 }}</td>
<td name="r401">{{ item.r401 }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
JS代码
/*******转存表格数据*******/
$(function() {
$('#btn3').click(function() {
var json_obj = {
data:$('#rrrform').serialize()
}; //JSON对象
var json_str = JSON.stringify(json_obj); //将JSON对象转变成JSON格式的字符串
$.post("/kankan", json_str, callback, "json");
})
})
/kankan路由对应的python后端函数
request.POST打印出来的结果为<QueryDict: {}>
@csrf_exempt
def kk(request):
print(request.POST)
#中间省去无关代码
return render(request, 'sr_list7.html', context)
请问应该怎么办?有帮助必采纳!