I need to display: None after clicking the print button. But the print page is opened using the window.open command. So I tried inlining the CSS to print without showing it, but it doesn't work.
This is where I put the inline CSS
<input type="button" style=" @media print{ display: none; }" id="printPageButton" onclick=" window.print(); " class="printPageButton noprint" value="Print" >
P粉8100506692024-03-30 00:46:35
Media queries do not exist in inline CSS. You can use CSS @media queries in external CSS files. For example:
@media print { #printPageButton { display: none; } }
Content to print