Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

how can i disable the functionality if the printscreen button in javascript

  Asked By: Vernon    Date: Jun 25    Category: Java    Views: 1795
  

is anybudyy tel me how can i disable the functionality
if the printscreen button in javascript when my web
page is active .. plz rely if anybudyy know

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Isabella Campbell     Answered On: Jun 25


This question should have gone to
javascript_official. Java and JavaScript
are totally different languages.

But be that as it may, there is really
no way to disable  printing in JavaScript.
Basically, if you can see it, you can
print it. A determined user can just do
a screen capture and print the results.

But the easiest way to discourage printing
is with styles:

@media.screen {
// all your regular styles go here.
}

@media.print {
body { display: none; }
}

Haven't actually tried this, you might have to
include all the other tags you use, too, but
I doubt it.