欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

淺析IE10兼容性問(wèn)題(frameset的cols屬性)

 更新時(shí)間:2014年01月03日 08:53:26   作者:  
主頁(yè)用frameset嵌了兩個(gè)頁(yè)面,左側(cè)為菜單欄,可以通過(guò)改變 frameset的cols來(lái)收縮。別的瀏覽器正常,但I(xiàn)E10卻沒(méi)任何的反應(yīng)

最近需求涉及瀏覽器的兼容性,首先處理的是ie10。

主頁(yè)用 frameset 嵌了兩個(gè)頁(yè)面,左側(cè)為菜單欄,可以通過(guò)改變 frameset 的 cols 來(lái)收縮。別的瀏覽器正常,但 IE10 卻沒(méi)任何的反應(yīng)。

復(fù)制代碼 代碼如下:

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,*";
}
}

設(shè)置cols無(wú)效果,設(shè)置rows可以,這個(gè)是由于IE10的BUG問(wèn)題,需要調(diào)整頁(yè)面大小才會(huì)生效:
復(fù)制代碼 代碼如下:

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);
}
}

相關(guān)文章

最新評(píng)論