如何在jquery中打开多个Window Browser

时间:2012-10-17 08:25:09

标签: javascript jquery

我想在窗口浏览器中显示我的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');
        }                                                                                          

1 个答案:

答案 0 :(得分:3)

这是简单的Javascript,而不是jQuery。

您只需指定新的windowName即可创建新的windowName。只需在windowName中添加一个uid,对应每个pdf文件。

window.open('actionToFileNo1', 'documentWindow1');

参考@MDN

相关问题