How to return to the page without refreshing the page in php

藏色散人
Release: 2023-03-13 16:28:02
Original
2908 people have browsed it

php method to return the page without refreshing: 1. Open the corresponding PHP code file; 2. Pass "echo"<script>alert('...');history.go(-1) ;</script>";" statement can be returned without refreshing the page.

How to return to the page without refreshing the page in php

The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer

How does php return to the page without refreshing it?

PHP implements methods of returning to the previous page without refreshing and refreshing

Returning to the previous page without refreshing:

echo"<script>alert(&#39;已从错题本中删除!&#39;);history.go(-1);</script>";
Copy after login

Returning to the previous page with refreshing:

echo "<script>alert(&#39;错题全部清除完毕!&#39;);location.href=&#39;" . $_SERVER["HTTP_REFERER"] . "&#39;;</script>";
Copy after login

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to return to the page without refreshing the page in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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