javascript| Printing
<script lanuage= "JavaScript" >
function Fun ()
{
var TempStr;
TempStr = "<table width = ' 100% ' >"
for (int i=0; i<6; i++)
{
TempStr + + "<tr><td>" + (i+1) + "</td><td>" + Helloword + "</td><tr>"
}
TempStr = "</table>"
document.write (TEMPSTR);
}
</script>
<body >
<input type= "File" name= "Txtpath" >
<input type= "button" value = "Print" OnClick = "javascript:window.print ()" >
<br> Call IE built-in print components to complete the Web printing scheme and routines
Source: Unknown publication time: 2004-11-8 "ovo.com.cn"
<br>
Focus:
<object id=webbrowser classid=clsid:8856f961-340a-11d0-a96b-00c04fd705a2 height=0 width=0 VIEWASTEXT>
</OBJECT>
<input Type=button value= Print class= "noprint" >
<input Type=button value= Direct Print class= "noprint" >
<input Type=button value= Page Setup class= "Noprint" >
<input Type=button value= Print preview class= "Noprint" >
<br>
<br>
Attention:
1, the CSS for printing control:
<!--Media=print This property can be effective when printing-->
<style media=print>
. Noprint{display:none;}
. Pagenext{page-break-after:always;}
</style>
The noprint style makes it very important that the print buttons on the page not appear on the printed page, because it can perform the most needed functions with minimal code
Pagenext style can be set paging, where the need for paging <div class= "Pagenext" ></div> on OK, hehe
2, the table line thickness of the settings, but also 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>
<br>
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>
</table>
</body>