Internet Explorer print header and footer settings workaround

Source: Internet
Author: User

First, explain the problem:
By default, through the IE Print dialog box, the printed content has headers and footers.
View IE page settings found in the image on the right, header footer.

The following first explains &w&bpage&p of &p, &u&b&d meaning
&w-Window Title
&u-page Address
&D-Short date format, such as 10/12/2006
&d-long date format, such as Tursday, October 12, 2006
&t-12 hour time
&t-24 hour time
&p-Face page number
&p-Total number of pages
&&-IE &
&b-the right side of the text before the symbol is aligned
&b&b-aligns the first symbol before the text in the play, aligns the text before the second symbol to the right end

Of course, we can manually delete the header footer, if the user does not want to modify themselves, you can use the following script to force the modification:

This trick is a bit harsh, it is to modify the registry. So a dialog box will pop up.

If you click "Yes", then the header and footer are not present as you wish.

Next, what if we need to recover?

If you click "Yes" in the code, then the header and footer are not present as you wish.

Next, what if we need to recover?

Code

where Wscript.Shell (Windows Script Host Runtime Library) is an object and the corresponding file is C:\WINDOWS\system32\ Wshom.ocx,wscript.shell is a component that the server system will use. Shell is the meaning of "shell", this object can do the operating system shell commonly used operations, such as running programs, read and write registry, environment variables and so on.
More WScript apps can view http://www.jb51.net/article/21296.htm

Transferred from: http://www.jb51.net/article/21297.htm

Internet Explorer print header and footer settings workaround

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.