Home > php教程 > php手册 > body text

PHP弹出对话框技巧详细解读

WBOY
Release: 2016-06-06 19:42:33
Original
942 people have browsed it

我们在实现PHP弹出对话框之后,一般还需要返回原来页面或者用新的页面替换原来的页面等,本文将会讲解详细代码编写,需要的朋友可以参考下

许多程序员们运用PHP语言进行WEB开发。那么在网站中通常都会遇到对话框弹出等功能需求。下面我们就为大家详细介绍PHP弹出对话框的相关实现方法。
1. PHP弹出对话框

alert (\"你好\");"; ?> //或者 alert (\"你好\");"; ?>

2. 如果需要PHP弹出对话框之后返回原来页面可以这么写

\r\n"; echo " alert(\"你好\");\r\n"; echo " history.back();\r\n"; echo ""; exit; ?> //或者 \r\n"; print " alert(\"你好\");\r\n"; print " history.back();\r\n"; print ""; exit; ?>

3. 如果需要PHP弹出对话框之后用新的页面替换原来的页面(更换当前历史纪录),原来页面可以这么写

\r\n"; echo " alert(\"你好\");\r\n"; echo " location.replace (\"http://www.jb51.net/\"); \r\n"; // 自己修改网址 echo ""; exit; ?> 或者 \r\n"; print " alert(\"你好\");\r\n"; print " location.replace (\"http://www.jb51.net/\"); \r\n"; // 自己修改网址 print ""; exit; ?>

本文介绍了PHP弹出对话框的三种状况,希望能够帮助大家熟练掌握PHP弹出对话框的实现方法。

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!