How to hide print button while printing?

后端 未结 5 1583
悲&欢浪女
悲&欢浪女 2021-01-23 05:57

I want to print the page on button click without opening a new tab.

I have a following lines of code that does the job for me.

function PrintDiv() {    
         


        
5条回答
  •  独厮守ぢ
    2021-01-23 06:42

    Simply use a media query to hide when printing

    @media print {
       #button-container{
          display: none;
       }
    }
    

提交回复
热议问题