
只需在成功回调中打开新窗口:
$.ajax({ type: "POST", url: "MyService.aspx/ConstructUrl", data: jsonData, contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { window.open("https://www.myurl.com"); }, error: function(msg) { //alert(error); }});请注意,您可能必须为此将$ .ajax的async选项设置为false,否则$ .ajax调用之后的代码可以在收到响应之前进行评估。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)