18910140161

HTML5不支持frameset的两种解决方法

顺晟科技

2021-06-16 10:59:00

290

解决方法如下:

使用Iframe,但是目前使用iframe的人越来越少,而且iframe与不同的浏览器不兼容。我在R&D的一些员工说,在iframe窗口之间传递值似乎很麻烦。

第二种

使用jQuery的onload方法加载页面,但是跳转到多个页面后,在浏览器顶部点击后退和前进是无效的,但是可以考虑添加一个后退按钮。

所以个人更倾向于这种方法。

我通常这样写

$('#main ')。load('mainIndex.html ',function(){ });

对于页面,div css可以达到边框的效果

!DOCTYPE HTMl HTMl heartheta http-equiv=' Content-TYPe ' Content=' text/html;Charset=utf-8' /titlediv css实现框架集效果/title styletype=' text/CSS '。表头{ border-bottom :1 pxsolid # CCC;margin-bottom :5 px;}.MainContainer {最小宽度width:960px更大宽度width:1600px}.侧边栏{ width:180pxfloat:leftmargin-right :-180 px;border-right :1 px solid # CCC;最小高度:500 px;padding:5px}.main { float:leftmargin-left :200 px;padding:5px}.内容{ padding:0 10px}/style/head body div class=' page ' div class=' header ' div id=' title ' h1 top/h1/div/div class=' main container ' div class=' sidebar '边栏/div div id=' main ' class=' main ' content/div/div//

总结

这就是本文的全部内容。希望本文的内容对你的学习或工作有所帮助。有问题可以留言交流。

相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航