适合0基础的web开发系列教程-框架
通过使用框架,你可以在同一个浏览器窗口中显示多个页面。
先看效果:

代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<frameset rows="50%,*">
<frame src="https://www.yyjcw.com/ke.html" name="topFrame" ></frame>
<frameset cols="50%,*" scrolling="Yes">
<frame src="http://www.sohu.com" name="left"/>
<frame src="http://www.qq.com" name="right" />
</frameset>
</frameset>
</html>
注意:框架页面是没有body的。
<frameset rows="50%,*">表示把页面分为上下两部分,上面占50%,剩下的给下面部分。
<frameset cols="50%,*" scrolling="Yes">:表示把下面部分拆分为左右两部分,cols="50%,*":表示左侧占50%,剩下的给右边。
框架经常用来做后台管理系统界面。
点击左侧导航,右侧加载不同的页面,实现局部刷新。

浙公网安备 33010602011771号