Home  >  Article  >  Backend Development  >  简单的页面跳转有关问题

简单的页面跳转有关问题

WBOY
WBOYOriginal
2016-06-13 13:44:56755browse

简单的页面跳转问题
关于页面跳转的问题,求教各位大虾,
在A页面输入一些数据,提交到 B 页面进行数据库处理之后,再返回到A页面的过程中,
B页面的处理结果,如何返显示到A页面?

先行谢过。



------解决方案--------------------
在B页中用javascript脚本就可以了,至于你要传递的数据,是php中的问题。。
------解决方案--------------------
用ajax,不用跳转就能将处理结果返回到A页面显示,下面是个小例子:

http://www.w3school.com.cn/jquery/ajax_post.asp
------解决方案--------------------
用ajax好处是页面无刷新,异步操作,用户体验好

用jquery 的ajax也不错,具体百度下
这是中文社区的
http://jquery.org.cn/manual/jQuery.ajax_options.html

要是不用ajax你就在A页面用表单提交,B页面处理后,再跳转到A页面
A页面



....



B页面
.....//入库操作什么的
header("Location:A.php"); //不过,这样用户体验不好!
------解决方案--------------------
用ajax比较好
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