Method 1: Interaction through Cookies.
There are three files in total, namely: index.htm, action.php, main.htm
The principle is that the front page main.htm and the background action.php are organized through the page frame index.htm, and the action. The page width of php is set to 0, which does not affect the display. action.php puts information into cookies, and main.htm implements interaction by reading cookies. In main.htm, you can also control the background CGI program by re-reading action.php.
index.htm
Copy code The code is as follows:
Test
This page uses page frames, but your browser does not support it.
action.php
Copy code The code is as follows:
srand((double)microtime()*1000000);
$result=rand( 0,100);
setcookie("action",$result,time()+900,"/");
?>
main.htm
Copy code The code is as follows:
Method 2: Interaction is achieved directly through parent.*.*.
There are three files in total, namely: index.htm, action.php, main.htm, of which index.htm is the same as the previous one.
The principle is to pass information directly through parent.rightFrame.test.current_cookie.value.
action.php
Copy code The code is as follows:
srand((double)microtime ()*1000000);
$result=rand(0,100);
?>
main.htm
Copy code The code is as follows:
Test
< a href="action.php" target="leftFrame">Reread Cookie
http://www.bkjia.com/PHPjc/320746.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320746.htmlTechArticleMethod 1: Interaction through Cookies. There are three files in total, namely: index.htm, action.php, main.htm. The principle is that the front page main.htm and the backend action.php are organized through the page frame index.htm...