Bypass Printdialog in IE9

后端 未结 2 590
攒了一身酷
攒了一身酷 2020-12-15 14:53

hy i am looking for a way to bypass the printdialog in IE 9. I now that there are some ways for ie 7/8 but they dont work for me at ie9

can someone please give me a

2条回答
  •  旧巷少年郎
    2020-12-15 15:00

    I really just wanted to leave a comment but since IE has revved up this should be included here. To have multi platform support I use this for javascript:

         function PrintWindow() {
    
            var isIE11 = !!navigator.userAgent.match(/Trident.*rv[ :]*11\./);
            if (navigator.appName == "Microsoft Internet Explorer" || isIE11== true) {
    
                var PrintCommand = '
    
    

    This checks for IE 11 now. It's a new way of defining the userAgent for Microsoft. There are other articles about this.

    提交回复
    热议问题