IE11 Windows 7 Print issue after kb4021558

后端 未结 7 1621
北恋
北恋 2020-12-08 11:12

Apologies for the slightly vague question but I\'m pulling my hair out. Since this update we have had numerous calls regarding printing from our web app. Our web app uses

7条回答
  •  难免孤独
    2020-12-08 11:21

    andyfinch, you're a genius! The following code appears to work for a print button contained within a frame:

    function Print() {
      if (document.queryCommandSupported('print')) {
        document.execCommand('print', false, null);
      }
      else {
        window.parent..focus();
        window.print();
      }
    }
    

提交回复
热议问题