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