我想在窗口浏览器中显示我的 pdf,实际上它对于单个 pdf 效果很好 我想同时打开两个窗口浏览器... 这是我的问题... 它可以同时工作任何一个而不是两个......但值获取一切工作正常......提前谢谢你..
if (is_chrome) {
window.open('<%: Url.Action("PrintLabelasPDFChrome", "Shipments") %>' + '?OrderNumber=' + orderno + '&orderItemNo=' + orderItemNo + '&orderShipmentID=' + orderShipmentID + '&strPackinglistDetail=' + '' + '&shipdate=' + '' + '&OrderGuid=' + '', 'Lables', 'attribute1,attribute2');
window.open('<%: Url.Action("PrintCustomLabel", "Shipments") %>' + '?orderShipmentID=' + orderShipmentID + '&strPackinglistDetail=CustomsDocument', 'Lables', 'attribute1,attribute2');
}
else {
window.open('<%: Url.Action("PrintLabelPDF", "Shipments") %>' + '?OrderNumber=' + orderno + '&orderItemNo=' + orderItemNo + '&orderShipmentID=' + orderShipmentID + '&strPackinglistDetail=' + '' + '&shipdate=' + '' + '&OrderGuid=' + '', 'Lables', 'attribute1,attribute2');
window.open('<%: Url.Action("PrintCustomLabel", "Shipments") %>' + '?orderShipmentID=' + orderShipmentID + '&strPackinglistDetail=CustomsDocument', 'Lables', 'attribute1,attribute2');
}
最佳答案
这是普通的 Javascript,而不是 jQuery。
您只需指定新窗口名称即可创建新窗口。只需在windowName中添加一个uid,对应每个pdf文件即可。
window.open('actionToFileNo1', 'documentWindow1');
引用文献@MDN .
关于javascript - 如何在jquery中打开多个窗口浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12930057/