我有这个ajax功能。成功响应后,ajax再次发送请求,然后循环。如果需要,我该怎么做假回报呢?
$(function () {
$("#acts1").jstree({
"html_data" : {
"ajax" : {
"url" : "ajax.php",
"data" : function (n) {
return { id : n.attr ? n.attr("id") : 0 };
},
}
},
"plugins" : [ "themes", "html_data", "ui", "crrm","checkbox" ]
})
});
答案 0 :(得分:1)
知道php返回会有所帮助,但要记住的其他事情是“回声”比返回更好,如果你回显真或假,请确保将其包装在json_encode()中,以便它以可读格式发送给你的ajax