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

黄舟
Release: 2023-03-07 06:52:01
Original
2834 people have browsed it

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>
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template