点击按钮调用window.print()时不打印按钮(用css控制)

 <asp:Button ID="Button1" runat="server" Text="打印"  class="buttonNoPrint" OnClientClick="javascript:window.print();return false;" />

 

 <style type="text/css">  
      @media print   {  
              .buttonNoPrint  
              {  
              display:   none;  
             
              }  
      }  
  </style>  

你可能感兴趣的:(window.print())