web| Print | page <meta http-equiv=content-type content= "text/html; charset=gb2312 ">
<script language=javascript>
function PRINTPR ()//preview functions
{
document.all ("Qingkongyema"). Click ()//Remove headers, footers before printing
document.all ("Dayindiv"). style.display= "None"; Hide elements that you do not want to print out before printing (hide print and print preview two buttons in this example)
var olecmdid = 7;
var PROMPT = 1;
var WebBrowser = ' <object id= ' WebBrowser1 ' width=0 height=0 classid= ' CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 ' ></OBJECT> ';
Document.body.insertAdjacentHTML (' BeforeEnd ', WebBrowser);
WEBBROWSER1.EXECWB (Olecmdid, PROMPT);
webbrowser1.outerhtml = "";
document.all ("Dayindiv"). style.display= "";//After printing, display the element (display "print" and "Print Preview" two buttons to make it easier for others to print next time)
}
function printture ()//print functions
{
document.all (' Qingkongyema '). Click ()/Ibid.
document.all ("Dayindiv"). style.display= "None";/Ibid.
Window.print ();
document.all ("Dayindiv"). style.display= "";
}
function Dopage ()
{
LayLoading.style.display = "none";/Ibid.
}
</SCRIPT>
<script language= "VBScript" >
Dim Hkey_root,hkey_path,hkey_key
Hkey_root= "HKEY_CURRENT_USER"
Hkey_path= "\SOFTWARE\Microsoft\Internet Explorer\PageSetup"
'//Set page to print header and footer empty
function Pagesetup_null ()
On Error Resume Next
Set regwsh = CreateObject ("Wscript.Shell")
hkey_key= "\header"
Regwsh.regwrite Hkey_root+hkey_path+hkey_key, ""
hkey_key= "\footer"
Regwsh.regwrite Hkey_root+hkey_path+hkey_key, ""
End Function
'//Set the page header footer as the default value
function Pagesetup_default ()
On Error Resume Next
Set regwsh = CreateObject ("Wscript.Shell")
hkey_key= "\header"
Regwsh.regwrite hkey_root+hkey_path+hkey_key, "&w&b page number, &p/&p"
hkey_key= "\footer"
Regwsh.regwrite Hkey_root+hkey_path+hkey_key, "&u&b&d"
End Function
</script>
</HEAD>
<body background= "Images/background_01.gif" leftmargin=0
Topmargin=0 rightmargin=0 bottommargin=0 style= "Background-position:center 50%" >
<div align=center>
What you would like to print ...
</DIV>
<div align= "center" id= "Dayindiv" name= "Dayindiv" ><input "button" type= "tab" class= "Print" >
<input type= "button" class= "tab" value= "Print Preview" >
<input type= "hidden" name= "Qingkongyema" id= "Qingkongyema" class= "tab" value= "clear page number" >
<input type= "hidden" class= "tab" value= "Restore page number" >
</DIV>
</BODY>
</HTML>