开发者

jQuery AJAX call working in IE but not FF?

开发者 https://www.devze.com 2023-01-02 20:10 出处:网络
$.ajax({ type: \"GET\", url: \'http://services.somewhere.com/Met开发者_运维技巧hodName\', data: { \'param1\':\'something\', \'param2\': \'somethingElse\' },
$.ajax({
            type: "GET",
            url: 'http://services.somewhere.com/Met开发者_运维技巧hodName',
            data: { 'param1':'something', 'param2': 'somethingElse' },
            cache: false,
            dataType: 'jsonp',
            contentType: "application/json; charset=utf-8",
            success: function(view) {
                alert('success');
            },
            error: function(xhr, ajaxOptions, thrownError) {
                alert(xhr.status);
                alert(xhr.responseText);
                alert(xhr.statusText);
            }
        });


Finally found solution here which clearly explains clearly how to consume web services

0

精彩评论

暂无评论...
验证码 换一张
取 消