Call the built-in ie printing component to complete the web printing scheme and routine (1)Call the built-in ie printing component to complete the web printing scheme and routine (10.28)
Important:
<Object ID = webbrowser classid = CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2 Height = 0 width = 0 viewastext>
</Object>
<Input type = button value = print onclick = "document. All. webbrowser. execwb (6, 1)" class = "noprint">
<Input type = button value = print onclick = "document. All. webbrowser. execwb (6)" class = "noprint">
<Input type = button value = page setting onclick = "document. All. webbrowser. execwb (8, 1)" class = "noprint">
<Input type = button value = print preview onclick = "document. All. webbrowser. execwb (7,1)" class = "noprint">
Note:
1. CSS control over printing:
<! -- Media = print this attribute can be valid during printing -->
<Style media = print>
. Noprint {display: none ;}
. Pagenext {page-break-after: Always ;}
</Style>
The noprint style makes the print button on the page not appear on the print page. This is very important because it can use the least code to complete the most required functions.
Pagenext styles can be set to pagination. If you need pagination, <Div class = "pagenext"> </div> the page is OK.
2. The line width of the table is set through the style sheet:
<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;
Border-collapse: collapse;
}
</Style>
Or:
<Style>
. Tdcs1 {
Border: solid windowtext 1.0pt;
}
. Tdcs2 {
Border: solid windowtext 1.0pt; border-left: none;
}
. Tdcs3 {
Border-top: none;
Border-left: solid windowtext 1.0pt;
Border-bottom: solid windowtext 1.0pt;
Border-Right: solid windowtext 1.0pt;
}
. Tdcs4 {
Border-top: none;
Border-left: none;
Border-bottom: solid windowtext 1.0pt;
Border-Right: solid windowtext 1.0pt;
}
. Underline {
Border-top-style: none;
Border-right-style: none;
Border-bottom-style: solid;
Border-left-style: none;
Border-bottom-color: #000000;
}
</Style>