如何解决Jquery EasyUi 错误或 json_encode 错误 (?)
所以我在使用 datagrid easyui 时遇到了问题。
请看一下这个 var_dump json 编码:
string(93) "{"total":1,"rows":[{"name":"Trinurtjahjo Sutjipto","code":"OP","result":95}]}"
尝试使用 datagrid jquery easyui 调用数据时出现此错误:
Uncaught TypeError: Cannot read property 'total' of null
这是我的 html 代码:
<table id="dg" title="Rekap KPI" class="easyui-datagrid"
style ="width:auto;height:400px"
url ="<?PHP echo (base_url('rekapkpi/getData'));?>" toolbar="#toolbar"
pagination="true"
rownumbers="false"
fitColumns="true" singleSelect="true"
checkBox ="true" striped="true"
remoteSort="false"
Nowrap ="false">
<thead>
<tr>
<th data-options="field:'namakaryawan',width:100">NAMA
KARYAWAN</th>
<th data-options="field:'kpi_divisi',width:100">DIVISI</th>
<th data-
options="field:'hasilBSc',width:100,align:'right'">NILAI KPI</th>
</tr>
</thead>
</table>
当我通过inspect element>network检查url时,没有返回json编码。 我试图遵循 this 但结果是“没有错误”。但为什么我的 json 编码返回空?
我也试过 this 但仍然
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。