Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/402.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 ExtJS跨域问题_Javascript_Ajax_Extjs_Cross Domain - Fatal编程技术网

Javascript ExtJS跨域问题

Javascript ExtJS跨域问题,javascript,ajax,extjs,cross-domain,Javascript,Ajax,Extjs,Cross Domain,我是extjs新手,面临跨域问题 Ext.Ajax.request({ method: "POST", url:'url', params:{ ahq_id: '104', username:'', password:'', callback:'WCL_Parser', }, async: true, dataType: 'jsonp', success: function(resp

我是extjs新手,面临跨域问题

Ext.Ajax.request({
    method: "POST",
 url:'url',
    params:{
        ahq_id: '104',
        username:'',
        password:'',
        callback:'WCL_Parser',
    },
    async: true,
    dataType: 'jsonp',
    success: function(response){
    console.info(response);

    }
});
我得到了错误的答案

 XMLHttpRequest cannot load http://182.73.236.115:8080/WCLRESTService/rest/Map/showVehiclesOnMap. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8282' is therefore not allowed access.
甚至我也尝试过使用回调函数

    function WCL_Parser(data){
    console.info(data);
}

错误没有得到解决。提前感谢。

您正在尝试获得JSONP答案,但使用的是Ajax请求。你到底在哪里找到了数据类型:“jsonp”;它不在ExtJS文档中。使用JsonP存储并完成它。你能帮我举个例子吗