JS Call printer (can clear header footer)

Source: Internet
Author: User

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en"
"Http://www.w3.org/TR/html4/loose.dtd" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> Set Header footer </title>
<script language= "JavaScript" >
var hkey_rootpath= "HKEY_CURRENT_USER\\Software\\Microsoft\\Internet explorer\\pagesetup\\";
function Pagesetup_del () {
try{
var wsc=new activexobject ("Wscript.Shell");
hkey_key= "Header";
Wsc.regwrite (Hkey_rootpath+hkey_key, "");
hkey_key= "Footer";
Wsc.regwrite (Hkey_rootpath+hkey_key, "");
}catch (e) {}
}
function Pagesetup_set () {
try{
var wsc=new activexobject ("Wscript.Shell");
hkey_key= "Header";
Wsc.regwrite (Hkey_rootpath+hkey_key, "&w&b page, &p/&p");
hkey_key= "Footer";
Wsc.regwrite (Hkey_rootpath+hkey_key, "&u&b&d");
}catch (e) {}
}
</script>
<body>
<object id= "WebBrowser" classid= "clsid:8856f961-340a-11d0-a96b-00c04fd705a2" width= "0" height= "0" >
</object>
<table width= "650" border= "1" align= "center" cellspacing= "0" bordercolorlight= "#FE7529" bordercolordark= "#FFFFFF" >
&LT;TR align= "center" bgcolor= "#FE7529" >
&LT;TD height= ">" Customer Name </td>
<td> Telephone </td>
&LT;TD > Contacts </td>
<td> Contact Phone </td>
<td>E-mail</td>
<td> Area </td>
</tr>
<tr>
&LT;TD height= > Hui Group </td>
<td>0432-65412**</td>
<td> Senior Manager </td>
<td>137562112**</td>
<td>[email protected]***.com</td>
<td> Jilin </td>
</tr>
<tr>
&LT;TD height= "> Jilin Province Tomorrow Technology Co., Ltd. </td>
<td>0431-84972266</td>
<td> Manager </td>
<td>137563185**</td>
<td>[email protected]</td>
<td> Changchun </td>
</tr>
<tr>
&LT;TD height= "> Xin * * * * Co., Ltd. </td>
<td>0431-65412***</td>
<td> Manager Wang </td>
<td>13756211***</td>
<td>[email protected]*****.com</td>
<td> Changchun </td>
</tr>
<tr>
&LT;TD height= "> East * * * Communication company </td>
<td>0434-56167**</td>
<td> manager Lee </td>
<td>1375631***4</td>
<td>[email protected]</td>
<td> Siping </td>
</tr>
</table>
<table width= "647" align= "center" >
&LT;TR align= "center" bgcolor= "#FFFFFF" >
&LT;TD height= "colspan=" 3 "align=" right "><a href=" # "onclick=" Pagesetup_del () "> Empty header Footer </a><a href= "#" onclick= "Pagesetup_set ()" > Restore header Footer </a><a href= "#" onclick= "DOCUMENT.ALL.WEBBROWSER.EXECWB (7,1) > Print preview </a> <a href= "#" onclick= "DOCUMENT.ALL.WEBBROWSER.EXECWB (6,1)" > Print </a> <a href= "#" onclick= "DOCUMENT.ALL.WEBBROWSER.EXECWB (6,6)" > Direct printing </a> <a href= "#" onclick= " DOCUMENT.ALL.WEBBROWSER.EXECWB (8,1) > Page Setup </a></td>
</tr>
</table>
</body>

JS Call printer (can clear header footer)

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.