怎样设置超链接页面的‘打印设置’(--是分少还是问题太简单) 在线
在一个html表格中,每一行都有一个打印按钮,每个按钮点击后链接到一个‘打印页面’。请问,
怎样控制每次点击‘打印按钮’后,出来的‘打印设置’都是一样的。(比如每次点击后,出来的页面的打印设置都是 A5 纸张)。怎样用javascript解决?
好像,ie菜单里的设置只在一个ie进程里有效,对于新开的页面就又是默认的打印设置了(A4)
-----------------------
或者换一种说法:如何在本页面中设置,点击链接的新页面的‘打印设置’都相同。即在本页面中设置好后,所有超链接出来的页面的‘打印设置’都一样。
谢谢
------解决方案--------------------自己用代码控制吧,仿照下面代码改改:
<object id= "factory " style= "display:none " viewastext
classid= "clsid:1663ed61-23eb-11d2-b92f-008048fdd814 "
codebase= "http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360 "
> </object>
<input type=button value=页面设置 onclick= "factory.printing.PageSetup() ">
<input type=button value=打印预览 onclick= "factory.printing.Preview() ">
<script language=javascript>
function window.onload()
{
// -- advanced features
factory.printing.SetMarginMeasure(2) // measure margins in inches
factory.printing.SetPageRange(false, 1, 3) // need pages from 1 to 3
factory.printing.printer = "HP DeskJet 870C "
factory.printing.copies = 2
factory.printing.collate = true
factory.printing.paperSize = "A5 "
factory.printing.paperSource = "Manual feed "
// -- basic features
factory.printing.header = "居左显示&b居中显示&b居右显示页码,第&p页/共&P页 "
factory.printing.footer = "(自定义页脚) "
factory.printing.portrait = false
factory.printing.leftMargin = 0.75
factory.printing.topMargin = 1.5
factory.printing.rightMargin = 0.75
factory.printing.bottomMargin = 1.5
}
function Print(frame) {
factory.printing.Print(true, frame) // print with prompt
}
</script>
<input type=button value= "打印本页 " onclick= "factory.printing.Print(false) ">
<input type=button value= "页面设置 " onclick= "factory.printing.PageSetup() ">
<input type=button value= "打印预览 " onclick= "factory.printing.Preview() "> <br>
<a href= "http://www.meadroid.com/scriptx/docs/printdoc.htm?static " target=_blank> 具体使用手册,更多信息,点这里 </a>