0

ウィンドウブラウザでPDFを表示したいのですが、実際には単一のPDFで問題なく動作します.2つのウィンドウブラウザを同時に開きたい...ここに私の問題があります... ...しかし、値はすべて正常に機能しています...よろしくお願いします..

    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');
        }                                                                                          
4

1 に答える 1

3

これは jQuery ではなくプレーンな Javascript です。

新しいウィンドウを作成するには、新しい windowName を指定するだけです。各pdfファイルに対応するwindowNameにuidを追加するだけです。

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

参照@MDN

于 2012-10-17T08:29:53.820 に答える