The frameset tag of HTML is widely used in multi-window program design, especially in the project background page. This article will analyze the precautions when using frameset on the ThinkPHP backend homepage index. The details are as follows:
File path: aoli/admin/Lib/Action/IndexAction.class.php
The code is as follows:
<?php class IndexAction extends Action{ public function index(){ $this->display(); } public function top(){ $this->display(); } public function left(){ $this->display(); } public function right(){ $this->display(); } } ?>
File path: aoli/admin/Tpl/default/Index
The index.html page code is as follows:
<frameset rows="20%,*"> <frame src="__URL__/top" name="top"> <frameset cols="20%,*"> <frame src="__URL__/left" name="left"> <frame src="__URL__/right" name="right"> </frameset> </frameset>
top.html (omitted)
left.html (omitted)
right.html (omitted)
Note:
When calling top.html, left.html, right.html, you should use the path __URL__/ to call the method, but not __TMPL__/Index/ to call the template .
Interested readers can debug and run the example in this article to experience the specific usage of path calling.
class IndexAction extends SessionAction {
//System homepage
public function index(){
$this->display();
}
......
}Is there any problem with this way of writing?
Don’t I remember it’s always written in the following way (⊙_⊙)?
class IndexAction extends Action {
//System homepage
public function index(){
$this->display();
}
....
}
There will be a name of the right frame in the frameset (assuming the value is: rframe)
In the link of the left frame. Add a target="rframe" to achieve clicking on the left link. The right page jumps Effect...