我引用了 SO 的 sols,但没有解决这个错误。
我有一个dashboard.html
带有搜索条件的文件,点击它会调用loadtable.js
,这个loadtable.js
文件使用search.php
从表中检索行,
但是有一些错误Uncaught SyntaxError: Unexpected token S in JSON at position 0
,我也不想在客户端显示服务器返回的 JSON。相反,我想显示表格并将值放入其中。我附上两者loadtable.js
和search.php
代码。
在dashboard.html我有如下代码
<!-- View Main Lead Table with Filters -->
<section class="operation" id="view_lead_info" style="display: none;">
<!-- Filters -->
<div class="row">
<div class="col">
<label><p><b>Select Filter</b></p></label>
</div>
</div>
<form action='' method='POST' class='filterformpost' id='filterformpost'>
<div class="row">
<div class="col span-1-of-4">
<div class="row">
<div class="col span-1-of-4">
Lead Status:
</div>
BIG阳