如何使用类型:“POST"在 jsonp ajax 调用中 [英] How to use type: "POST" in jsonp ajax call

查看:28
本文介绍了如何使用类型:“POST"在 jsonp ajax 调用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 JQuery ajax jsonp.我有以下 JQuery 代码:

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();  
         } 

    });  

上面的代码工作正常,我只想将请求发送为 "POST" 而不是 "GET",请建议我如何实现这一点.

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.

谢谢

推荐答案

您不能使用 JSONP 进行 POST...它根本不能那样工作,它创建了一个

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆