浏览器打印

/*
 * 2004年12月21日
 * Author:longware<longware@126.com>
 * Usage:<script language="JavaScript" src="./ie6print.js"></script>
 * Note:浏览器需求IE6.0+,在HTTP页面上打印必须将IE的安全级别降低.
 */
document.writeln("<style>");
document.writeln(".btn{font-size:9pt;border-bottom:#cccccc 1px ridge;border-right:#cccccc 1px ridge;border-top:#ffffff 1px ridge;border-left:#ffffff 1px ridge;}");
document.writeln("</style>");
document.writeln("<style media=/"print/">");
document.writeln(".Noprint{display:none;}");
document.writeln(".PageNext{page-break-after: always;}");
document.writeln("</style>");
document.write("<scri");
document.write("pt language=/"JavaS");
document.write("cript/">");
document.writeln("function printSetup(){wb.execwb(8,1);}");
document.writeln("function printPreview(){wb.execwb(7,1);}");
document.writeln("function printNow(){if(confirm('您确定开始打印吗?')){window.print();}}//wb.execwb(6,6);");
document.writeln("function printHelp(){alert(/"如果出现『该页上的 ActiveX 控件不安全』的提示,请将浏览器『Internet选项』中的相关安全设置降低即可。/")}");
document.writeln("</script>");
document.writeln("<div class=/"Noprint/" align=/"right/">");
document.writeln("<br>");
document.writeln("<object classid=/"clsid:8856f961-340a-11d0-a96b-00c04fd705a2/" height=/"0/" width=/"0/" id=/"wb/" name=/"wb/"></object>");
document.writeln("<input type=/"button/" value=/"页面设置/" class=/"btn/" onclick=/"printSetup();/">&nbsp;");
document.writeln("<input type=/"button/" value=/"打印预览/" class=/"btn/" onclick=/"printPreview();/">&nbsp;");
document.writeln("<input type=/"button/" value=/"开始打印/" class=/"btn/" onclick=/"printNow()/">&nbsp;");
document.writeln("<input type=/"button/" value=/"帮助/" class=/"btn/" onclick=/"printHelp()/" style=/"cursor:help/">&nbsp;");
document.writeln("<input type=/"button/" value=/"关闭窗口/" class=/"btn/" onclick=/"window.close()/">&nbsp;");
document.writeln("</div>");
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页