First, a simple and practical method (you can print multiple pages, control pages, and hide non-print items) is provided)
<! -- Save language independence as. HTML -->
<Html>
<Head>
<Meta name = vs_targetSchema content = "http://schemas.microsoft.com/intellisense/ie5">
<Title> View </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<! -- Media = print this attribute can be valid during printing -->
<Style media = print>
. Noprint {display: none ;}
. PageNext {page-break-after: always ;}
</Style>
<Style>
. Tdp
{
Border-bottom: 1 solid #000000;
Border-left: 1 solid #000000;
Border-right: 0 solid # ffffff;
Border-top: 0 solid # ffffff;
}
. Tabp
{
Border-color: #000000 #000000 #000000 #000000;
Border-style: solid;
Border-top-width: 2px;
Border-right-width: 2px;
Border-bottom-width: 1px;
Border-left-width: 1px;
}
. NOPRINT {
Font-family: "";
Font-size: 9pt;
}
</Style>
</Head>
<Body>
<Center class = "Noprint">
<P>
<OBJECT id = WebBrowser classid = CLSID: 8856F961-340A-11D0-A96B-00C04FD705A2 height = 0 width = 0>
</OBJECT>
<Input type = button value = print onclick = document. all. WebBrowser. ExecWB (6, 1)>
<Input type = button value = print onclick = document. all. WebBrowser. ExecWB (6, 6)>
<Input type = button value = page setting onclick = document. all. WebBrowser. ExecWB (8, 1)>