87,997
社区成员




<br id='setpBr1' name='setBr'>
<br id='setpBr2' name='setBr'>
<br id='setpBr3' name='setBr'>
<br id='setpBr4' name='setBr'>
<br id='setpBr5' name='setBr'>
<img id='setpImg1' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg2' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg3' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg4' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg5' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script>
function test() {
alert(document.getElementsByName("setpImg").length);//reslut:5
var hh = document.getElementsByName("setpImg");
alert(hh.length); //reslut:5
var hhh = document.getElementsByName("setBr");
alert(hhh.length); //reslut:5
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<br id='setpBr1' name='setBr'>
<br id='setpBr2' name='setBr'>
<br id='setpBr3' name='setBr'>
<br id='setpBr4' name='setBr'>
<br id='setpBr5' name='setBr'>
<img id='setpImg1' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg2' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg3' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg4' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<img id='setpImg5' name='setpImg' src='./img/going_down.png' height='59' width='36'/>
<input id="btntets" onclick="test();" type="button" value="testt"/>
</div>
</form>
</body>
</html>
page1
page2
//设置打印 <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 = "A4" 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 } <br> 具体使用手册,更多信息,点这里 //自带的打印预览 WebBrowser.ExecWB(1,1) 打开 Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口 Web.ExecWB(4,1) 保存网页 Web.ExecWB(6,1) 打印 Web.ExecWB(7,1) 打印预览 Web.ExecWB(8,1) 打印页面设置 Web.ExecWB(10,1) 查看页面属性 Web.ExecWB(15,1) 好像是撤销,有待确认 Web.ExecWB(17,1) 全选 Web.ExecWB(22,1) 刷新 Web.ExecWB(45,1) 关闭窗体无提示Browser.ExecWB(7,1)>