搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Thanks For Your Support in advance i want to know that when I open a website that time view print option and when I click close button then page also new window page also close. I want to copy it how i can stop this print option?

more options

WHEN I OPEN A URL THAT TIME WITH PAGE OPEN SHOWS PRINT OPTION AND WHEN I CLICK CLOSE BUTTON OF PRINT OPTION THAT TIME NEW WINDOW BUTTON IS CLOSED. I WANT TO CLOSE ONLY PRINT OPTION. PLEASE HELP ME...............THANKS

WHEN I OPEN A URL THAT TIME WITH PAGE OPEN SHOWS PRINT OPTION AND WHEN I CLICK CLOSE BUTTON OF PRINT OPTION THAT TIME NEW WINDOW BUTTON IS CLOSED. I WANT TO CLOSE ONLY PRINT OPTION. PLEASE HELP ME...............THANKS

所有回覆 (1)

more options

Many sites which offer specific "print formatted" pages do that: they assume that once you have finished with the print dialog you no longer want the page itself. So for your convenience they close it. Not so convenient for you, since you still want to view the page.

I'm not aware of an easy solution for this. I can think of a couple different approaches.

First, maybe there's an add-on to solve this? That would be easiest.

Second, maybe there's a userscript to solve this?

The Greasemonkey add-on runs userscripts which you can copy or download. Be careful to install only long-establish and trusted scripts. (Is there a site that has this bad behavior that I can view without logging in? I will test one of my existing scripts to see whether it helps.)

Third, Firefox has an old system for restricting site permissions in a custom text file in your profile folder (named user.js). Editing this file is a bit advanced, and I haven't been able to test it, but the system works along these lines:


// Define a policy name for window.close permission // (assumes you don't have this pref already) user_pref("capability.policy.policynames", "nowindowclose"); // Define policy: disable sites from using window.close // in their scripts user_pref("capability.policy.nowindowclose.Window.close", "noAccess"); // List of sites subject to this policy user_pref("capability.policy.nowindowclose.sites", "firstbadsite.com secondbadsite.com");

Again, I haven't tested that and recommend looking into add-ons first.

由 jscher2000 - Support Volunteer 於 修改