想自定义实现搜索功能,查资料选择用setGridParam方法,但是后端可以实现搜索,却无法将数据传回jqgrid前端
$("#list").jqGrid("setGridParam",{
datatype: 'json',
mtype: 'POST',
url:"mission_search.php",
page:1,
postData:{id:id,people:data_people.value,start_time:data_start_time,start_time:data_start_time},
}).trigger("reloadGrid");
//按照创建表单时的方式,尝试把数据用json格式返回,但无效
$responce=json_encode($responce);
echo $responce;
F12打开控制台看是不是报错了,比如postData中的data_people控件id打错了。
为什么有2个start_time?后面一个应该是end_time什么的吧。查询开始到结束时间的数据。