robert_gsfame Posted November 20, 2010 Share Posted November 20, 2010 I have this <body bgcolor="brown"> i wish to change bgcolor into white once print button being clicked window.print() how can i do that?? thx Quote Link to comment https://forums.phpfreaks.com/topic/219264-change-body-bgcolor-once-print/ Share on other sites More sharing options...
ohdang888 Posted November 20, 2010 Share Posted November 20, 2010 <script> function changeAndPrint(){ document.bgColor="#FFFFFF"; window.print(); } </script> <input type="button" name="Click me!" onClick="changeAndPrint();"/> Quote Link to comment https://forums.phpfreaks.com/topic/219264-change-body-bgcolor-once-print/#findComment-1137065 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.