即日起在codingBlog上分享您的技术经验即可获得积分,积分可兑换现金哦。

How to use type: “POST” in jsonp ajax call

栈溢出 hippietrail 60℃ 0评论
本文目录
[隐藏]

1.原始问题:How to use type: “POST” in jsonp ajax call

I am using JQuery ajax jsonp. I have got below JQuery Code:

 $.ajax({  
        type:"GET",        
        url: "Login.aspx",  // Send the login info to this page
        data: str, 
        dataType: "jsonp", 
        timeout: 200000,
        jsonp:"skywardDetails",
        success: function(result)
        { 
             // Show 'Submit' Button
            $('#loginButton').show();

            // Hide Gif Spinning Rotator
            $('#ajaxloading').hide();  
         } 

    });  

The above code is working fine, I just want to send the request as “POST” instead of “GET”, Please suggest how can I achieve this.

Thanks

2.被采纳答案

You can’t POST using JSONP…it simply doesn’t work that way, it creates a

喜欢 (0)or分享 (0)
发表我的评论
取消评论

*

表情