Detailed explanation and correction of the error in printing the current page in PHP
<p><input type="button" name="print" value="预览并打印" onclick="preview()" id="pt"> <a href="?index" style="">继续查询</a></p>
When I made the query system, everything was normal, but I found an error every time I printed it. The current page cannot be printed. I thought about it. Is there something wrong with my expression?
Ever since, I asked Du Niang and Uncle Gu for advice, and found out that there was a problem with my expression. The correct expression should be like this.
<p><input type="button" name="print" value="预览并打印" onclick="javascript:window.print()" id="pt"> <!-- //修正打印本页错误 --> <a href="?index" style="">继续查询</a></p>
The above is the detailed content of Detailed explanation to fix the error in printing the current page in PHP. For more information, please follow other related articles on the PHP Chinese website!