官网:[url]www.meadroid.com/ScriptX/[/url]
引用ScriptX.cab
几个属性:
几个方法:
PageSetup()中能设置上下左右边距,挺好用
引用ScriptX.cab
<OBJECT id=factory style="DISPLAY: none"
codeBase=../../cicerone/ScriptX.cab#Version=5,60,0,360
classid=clsid:1663ed61-23eb-11d2-b92f-008048fdd814 viewastext></OBJECT>
几个属性:
<script language=JavaScript>
function setPrintBase(headerText,footerText,rootUrl) {
//var header = (headerText==null||headerText=="")?'默认页眉':headerText;
//var footer = (footerText==null||footerText=="")?'默认页角':footerText;
//factory.printing.header = "&b"+header+"&b" ;
//factory.printing.footer = "&b"+footer;
factory.printing.portrait = true;
factory.printing.leftMargin =0.00;
factory.printing.topMargin =0.00;
factory.printing.rightMargin =0.00;
factory.printing.bottomMargin =0.00;
}
</SCRIPT>
几个方法:
<input name="printbutton" type="button" class="input" value="打印" onclick="factory.printing.Print(true)" >
<input id="idPrint2" type="button" value="页面设置" class="input"
onclick="factory.printing.PageSetup()">
<input id="idPrint3" type="button" value="打印预览" class="input"
onclick="factory.printing.Preview()">
<input name="backbutton" type="button" class="input" value="返回" onClick="javascript:history.go(-1)">
PageSetup()中能设置上下左右边距,挺好用