在async:{}代码块里面的url应该怎么写,我查了网上的资料,还是没进入相对应的action,想请教各位大神高手,可能是什么原因呢?非常感谢!!
var setting = {
data: {
simpleData: {
enable: true,
idKey: "id",
pIdKey: "pId",
rootPId: null
}
}
,async: {
enable: true,
type: "post",
//contentType: "application/json",
url:"selectChildMenu.action",
autoParam:["id"],
dataType:"text"
}
/*
*初始化加载数据
*/
function init(){
$.ajax({
type:"post",
url:"selectParentMenu.action",
dataType:"json",
success:function(date) {
$.fn.zTree.init($("#tree"), setting, jQuery.parseJSON(date));
}
});
}
var setting = {
data: {
simpleData: {
enable: true,
idKey: "id",
pIdKey: "pId",
rootPId: null
}
}
,async: {
enable: true,
type: "post",
//contentType: "application/json",
url:"selectChildMenu.action",
autoParam:["id"],
dataType:"text"
}
/*
*初始化加载数据
*/
function init(){
$.ajax({
type:"post",
url:"selectParentMenu.action",
dataType:"json",
success:function(date) {
$.fn.zTree.init($("#tree"), setting, jQuery.parseJSON(date));
}
});
}










