Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.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
如何捕获jQuery.ajax()中未找到的405方法_Jquery_Ajax_Web Services_Webservice Client_Jqxhr - Fatal编程技术网

如何捕获jQuery.ajax()中未找到的405方法

如何捕获jQuery.ajax()中未找到的405方法,jquery,ajax,web-services,webservice-client,jqxhr,Jquery,Ajax,Web Services,Webservice Client,Jqxhr,我试图了解网站是否意外地进行了跨域调用,例如,如果用户在url而不是域中键入IP。这是一个商业的、可安装的应用程序,所以我没有IIS控件来设置任何转发等。。这不起作用: error: function (x, e) { // If the web service failed for any of the reasons below, then we // call the custo

我试图了解网站是否意外地进行了跨域调用,例如,如果用户在url而不是域中键入IP。这是一个商业的、可安装的应用程序,所以我没有IIS控件来设置任何转发等。。这不起作用:

                error: function (x, e) {
                    // If the web service failed for any of the reasons below, then we
                    // call the custom error dialog display function with the response
                    // text passed back from the erro
                    if (x.status === 405) {
                       alert("405 error")
                    } 
                }

javascript中是否有方法捕获405错误?

您是否尝试过使用该方法?

您是否尝试过使用该方法?

您找到解决方案了吗?您找到解决方案了吗?