在IE默认打印时,总要显示出页眉和页脚。此插件可设置Web打印时的页眉页脚插件。
代码如下:
<object id="factory" style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
codebase= "Active/smsx.cab"></object> <!--> codebase 是插件的相对路径<-->
<script language="Javascript">
<!--
function window.onload() {
factory.printing.header = "";
factory.printing.footer = "";
factory.printing.portrait = true; //portrait是指打印方向,设置为true就是纵向,false就是横向。
factory.DoPrint(true); //设置为false,直接打印
}
//-->
</script>
- 1
- 2
- 3
- 4
- 5
- 6
前往页