浅析IE10兼容性问题(frameset的cols属性)
作者:互联网
2025-08-15
最近需求涉及浏览器的兼容性,首先处理的是ie10。
主页用 frameset 嵌了两个页面,左侧为菜单栏,可以通过改变 frameset 的 cols 来收缩。别的浏览器正常,但 IE10 却没任何的反应。
复制代码代码如下:
function hide_show(){
if(window.parent.outer_frame.cols=="0,10,*"){
frameshow.src="< %=request.getContextPath()% >/common/images/left_handle.gif";
div_hide_show.title="隐藏"
window.parent.outer_frame.cols = "210,10,*";
}else{
frameshow.src="< %=request.getContextPath()% >/common/images/right_handle.gif";
div_hide_show.title="显示"
window.parent.outer_frame.cols = "0,10,*";
}
}
设置cols无效果,设置rows可以,这个是由于IE10的BUG问题,需要调整页面大小才会生效:
复制代码代码如下:
function hide_show(){
if(window.parent.outer_frame.cols=="0,10,*"){
frameshow.src="< %=request.getContextPath()% >/common/images/left_handle.gif";
div_hide_show.title="隐藏"
window.parent.outer_frame.cols = "210,10,*";
}else{
frameshow.src="< %=request.getContextPath()% >/common/images/right_handle.gif";
div_hide_show.title="显示"
window.parent.outer_frame.cols = "0,10,*";
}
/*force ie10 redraw*/
if(navigator.userAgent.indexOf('MSIE 10.0') != -1){
var w = parent.document.body.clientWidth;
parent.document.body.style.width = w + 1 + 'px';
setTimeout(function(){
parent.document.body.style.width = w - 1 + 'px';
parent.document.body.style.width = 'auto';
}, 0);
}
}
相关标签:
相关推荐
专题
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
+ 收藏
最新数据
相关文章
都知道AI大模型能生成文本内容,那你知道大模型是怎样生成文本的吗?
vue3 数据响应式遇到的问题
vxe-table 自定义数字行主键,解决默认字符串主键与后端类型不匹配问题
AI 打字跟随优化
你的 Vue 3 defineEmits(),VuReact 会编译成什么样的 React?
Vue3 + TS 企业级工程化项目全套实战(Vue3 + Vite + Pinia + VueRouter + Element Plus)
Vue 3 defineOptions 宏,用 VuReact 编译成 React 长什么样?
Vue3 KeepAlive 深度揭秘:组件缓存的魔法是如何实现的?
你的 Vue 3 useAttrs(),VuReact 会编译成什么样的 React?
虚拟 DOM 的 Diff 算法:Vue/React 如何实现高效更新
AI精选
