Home >Backend Development >PHP Tutorial >Detailed explanation to fix the error in printing the current page in PHP

Detailed explanation to fix the error in printing the current page in PHP

黄舟
黄舟Original
2017-03-28 10:02:082823browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn