Php implements the print preview function
. Noprint {display: none}
No printing required
Script
Functionpreview (outputs)
{
If (then <10)
{
Bdhtml###doc ument. body. innerHTML; // Obtain the html code of the current page
Sprnstr =" "; // Set the start area for printing.
Eprnstr =" "; // Set the print end area
Prnhtml = bdhtml. substring (bdhtml. indexOf (sprnstr) + 18); // retrieves html from the start code
Prnhtmlprnhtml = prnhtml. substring (0, prnhtml. indexOf (eprnstr); // retrieves html from the end code
Too many doc ument. body. innerHTML = prnhtml;
Window. print ();
Required parameter doc ument. body. innerHTML = bdhtml;
} Else {
Window. print ();
}
}
Script
XXXXX
Content to print
. Noprint {display: none}
No printing required
Script
Functionpreview (outputs)
{
If (then <10)
{
Bdhtml###doc ument. body. innerHTML; // Obtain the html code of the current page
Sprnstr =" "; // Set the start area for printing.
Eprnstr =" "; // Set the print end area
Prnhtml = bdhtml. substring (bdhtml. indexOf (sprnstr) + 18); // retrieves html from the start code
Prnhtmlprnhtml = prnhtml. substring (0, prnhtml. indexOf (eprnstr); // retrieves html from the end code
Too many doc ument. body. innerHTML = prnhtml;
Window. print ();
Required parameter doc ument. body. innerHTML = bdhtml;
} Else {
Window. print ();
}
}
Script
XXXXX
Content to print
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.