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

php后台程序与Javascript的两种交互方式

WBOY
Release: 2016-06-13 12:21:06
Original
2201 people have browsed it

方法一:通过Cookie交互。
一共是三个文件,分别为:index.htm,action.php,main.htm
原理为前台页面main.htm和后台action.php通过页面框架 index.htm组织起来,将action.php的页面宽度设为0,这样并不影响显示。action.php将信息放入cookie中,main.htm通过读取 cookie来实现交互。在main.htm中也可以通过重新读取action.php 来实现控制后台CGI程序。
index.htm

复制代码 代码如下:




Test





<br> <br><p></p>
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