将ajax响应重定向到另一个jsp页面,并在新选项卡中打开响应数据

时间:2016-06-13 07:37:50

标签: jquery ajax jsp

我正在使用Ajax提交表单,我正在获取另一个jsp的响应。我想将另一个jsp重定向到新标签。

$.ajax({ 
    data: $('#frmPrintReports').serialize(), 
    type: $('#frmPrintReports').attr('method'), 
    url: $('#frmPrintReports').attr('action'), 
    success: function(data, status, xhr) { 
        console.log("result : " + data);//here I get the another jsp data which I want to redirect to new tab

    },
    error: function(XMLHttpRequest, textStatus, errorThrown) {
        alert("some error");
    }
}); 

0 个答案:

没有答案