Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用Jquery时获取非法调用错误_Javascript_Jquery_Ajax - Fatal编程技术网

Javascript 使用Jquery时获取非法调用错误

Javascript 使用Jquery时获取非法调用错误,javascript,jquery,ajax,Javascript,Jquery,Ajax,我在Jquery中尝试使用ajax调用时遇到以下错误。我在下面解释我的代码 Error: Uncaught TypeError: Illegal invocation at e (http://oditek.in/fyndspace/js/jquery.js:4:23990) at Vc (http://oditek.in/fyndspace/js/jquery.js:4:23875) at Vc (http://oditek.in/fyndspace/js/jquery

我在Jquery中尝试使用ajax调用时遇到以下错误。我在下面解释我的代码

Error: Uncaught TypeError: Illegal invocation
    at e (http://oditek.in/fyndspace/js/jquery.js:4:23990)
    at Vc (http://oditek.in/fyndspace/js/jquery.js:4:23875)
    at Vc (http://oditek.in/fyndspace/js/jquery.js:4:23898)
    at Function.m.param (http://oditek.in/fyndspace/js/jquery.js:4:24236)
    at Function.ajax (http://oditek.in/fyndspace/js/jquery.js:4:20195)
    at Function.m.(anonymous function) [as post] (http://oditek.in/fyndspace/js/jquery.js:4:22297)
    at saveAllManageSpaceData (http://oditek.in/fyndspace/listyourspace:1418:6)
    at HTMLButtonElement.onclick (http://oditek.in/fyndspace/listyourspace:693:102)
我的工作代码如下

<button class="btn nextbtnbgdiv open6" type="button" onclick="saveAllManageSpaceData();">Save &amp; Continue <span class="fa fa-arrow-right"></span></button>



var data={"city":city,"area":area,"list_name":list_name,"file_data":file_data,"stDate":stDate,"endDate":endDate,"address":address,"latitude":latitude,"longitude":longitude,"description":description,"tag_google_map":tag_google_map,"space_area":space_area,"space_status":space_status,"price":price,"sPrice":sPrice,"price_type":price_type,"booth_size":booth_size,"height":height,"width":width,"spaceAccess":spaceAccess,"rules":rules,"Overview":Overview,"depositeForLoss":depositeForLoss,"dkeyAccess":dkeyAccess};
console.log('hello',data);
var url="common.php?action=saveManageSpace";
$.post(url,data,function(data){
    console.log('res',data);
});
保存&;继续
var data={“城市”:城市,“区域”:区域,“列表名称”:列表名称,“文件数据”:文件数据,“stDate”:stDate,“endDate”:endDate,“address”:地址,“纬度”:纬度,“经度”:经度,“description”:description,“tag\u谷歌地图”:tag\u谷歌地图,“space\u区域”:space\u区域,“space\u状态”:space\u状态,“price”:price,“price\u类型”:price\u类型,“booth\u大小”:展位尺寸,“高度”:高度,“宽度”:宽度,“空间访问”:空间访问,“规则”:规则,“概述”:概述,“存款Forloss”:存款Forloss,“dkeyAccess”:dkeyAccess};
log('hello',data);
var url=“common.php?action=saveManageSpace”;
$.post(url、数据、函数(数据){
console.log('res',数据);
});

在这里,我在使用ajax调用时遇到了上述错误。请帮助我解决此问题。

您的数据是一个对象-您可能希望尝试使用数组

 var data=[{"city":city,"area":area,"list_name":list_name,"file_data":file_data,"stDate":stDate,"endDate":endDate,"address":address,"latitude":latitude,"longitude":longitude,"description":description,"tag_google_map":tag_google_map,"space_area":space_area,"space_status":space_status,"price":price,"sPrice":sPrice,"price_type":price_type,"booth_size":booth_size,"height":height,"width":width,"spaceAccess":spaceAccess,"rules":rules,"Overview":Overview,"depositeForLoss":depositeForLoss,"dkeyAccess":dkeyAccess}];

显示click事件处理程序和所需的元素clicked@mplungjan当前位置请再次查看我的帖子。