在机票版本中应用了iframe,但FF对iframe的高度解析有问题,因此调用以下JS
function SetCwinHeight(){
var xunzou=document.getElementById(“xunzou”); //iframe id
if (document.getElementById){
if (xunzou && !window.opera){
if (xunzou.contentDocument && xunzou.contentDocument.body.offsetHeight){
xunzou.height = xunzou.contentDocument.body.offsetHeight;
}else if(xunzou.Document && xunzou.Document.body.scrollHeight){
xunzou.height = xunzou.Document.body.scrollHeight;
}
}
}
}
HTML调用
<iframe width=”100%” id=”xunzou” οnlοad=”Javascript:SetCwinHeight()” height=”1″ frameborder=”0″ src=”地址” scrolling=”no”></iframe>