淺析IE10兼容性問題(frameset的cols屬性)
最近需求涉及瀏覽器的兼容性,首先處理的是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);
}
}
相關文章
js實現(xiàn)雙向鏈表互聯(lián)網(wǎng)機頂盒實戰(zhàn)應用實現(xiàn)
js實現(xiàn)雙向鏈表互聯(lián)網(wǎng)機頂盒實戰(zhàn)應用實現(xiàn),需要的朋友可以參考下。2011-10-10element?ui?-?el-button?重新渲染后disabled屬性失效問題解決
這篇文章主要介紹了elementui el-button重新渲染后disabled屬性失效問題解決,解決方法也很簡單,給el-button元素添加key值就可以了,需要的朋友可以參考下2023-07-07uniapp組件傳值的方法(父傳子,子傳父,對象傳值)實戰(zhàn)案例
現(xiàn)在的前端開發(fā)中基本上都是組件化開發(fā)的,下面這篇文章主要給大家介紹了關于uniapp組件傳值(父傳子,子傳父,對象傳值)的相關資料,文中通過實例代碼介紹的非常詳細,需要的朋友可以參考下2023-03-03JavaScript通過極大極小值算法實現(xiàn)AI井字棋游戲
極小極大值搜索算法是一種零和算法,是用來最小化對手的利益,最大化自己的利益的算法。極小極大之搜索算法常用于棋類游戲等雙方較量的游戲和程序,算是一種電腦AI算法。本文將介紹通過這個算法實現(xiàn)的一個井字棋游戲,需要的可以參考一下2021-12-12