google chrome print preview does not load the page the first time

前端 未结 4 1272
刺人心
刺人心 2021-01-12 17:51

I\'m trying to print a page using this code



    

        
4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-12 18:20

    actually you can create an extension css and place all your css in there...


    Default

     mywindow.document.write('');
    

    Then just replace it like this

    mywindow.document.write('');
    

    just add media='print' to recognize it..

    Hope it will help...

提交回复
热议问题