我需要一些href链接的帮助,以便在jquery中打开新标签页。我得到以下的结果,如果我点击下面的链接支付现在我从RtObject.ReturnVal.my结果成功获得结果获得以下结果显示在新标签中。 $(函数(){ $( “#OrderTable> TBODY> TR> TD> .paynow”)。点击( '点击',函数(Myevent){在jquery中打开新标签
Myevent.preventDefault();
var passval = $(this).parents().siblings('td:eq(1)').text();
$.ajax({
type: "POST",
datatype: "json",
async: true,
url: '/MyAccount/PayNow?OrderId=' + passval,
contentType: "application/json; charset=utf-8",
success: function (RtObject) {
//alert(RtObject.isError);
//alert(RtObject.CId);
if (!RtObject.isError) {
//alert(RtObject.isError);
if (RtObject.CId == 1) {
var newwin;
if (newwin && !newwin.closed) {
newwin.focus();
} else {
$(this).target = "_blank";
window.location = RtObject.ReturnVal;
}
}
else if (RtObject.CId == -1) {
jAlert(RtObject.Message, "Failure");
}
}
},
failure: function (response) {
jAlert("Cant go to payment process", "Failure");
}
});
});
请帮我解决这个问题。
的可能的复制[jQuery的:去与目标= “\ _blank” URL](http://stackoverflow.com/questions/6673473/jquery-go-to-url-与目标空白) –
它不工作.. – White