我想url
在新标签中打开一个。
我正在使用以下代码在新选项卡中打开 url。
var url = "/Billing/DownloadEDIForMultipleClaim?month=" + month + "&BillRequestIds=" + billRequestIds.join(',') + "&PatientIDs=" + patientIds.join(',');
window.open(url, '_blank'); //exception here
但这对我不起作用Uncaught TypeError: Cannot read property 'open' of undefined
我也使用了以下。
var url = "/Billing/DownloadEDIForMultipleClaim?month=" + month + "&BillRequestIds=" + billRequestIds.join(',') + "&PatientIDs=" + patientIds.join(',');
var win = window.open(url, '_blank');
if(win) {
//Browser has allowed it to be opened
win.focus();
} else {
//Broswer has blocked it
alert('Please allow popups for this site');
}
我已经看到了相关的问题。
如何使用 javascript 或 jquery 在新选项卡中打开 URL?
但这对我不起作用。