首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

怎样固定iframe的高度阿?解决办法

2012-02-12 
怎样固定iframe的高度阿?下面是我的页面,当点击两个iframe中间的按钮时,下面的iframe向上移动了,总高度发

怎样固定iframe的高度阿?
下面是我的页面,当点击两个iframe中间的按钮时,下面的iframe向上移动了,总高度发身了变化;但是我要的效果是总高度不变的情况下,下面的iframe向上移动.


<%@   page   contentType= "text/html;   charset=GBK "   %>
<html>
<head>
<title> </title>

<script   type= "text/javascript "> //   Example:   obj   =   findObj( "image1 ");
function   findObj(theObj,   theDoc)
{
    var   p,   i,   foundObj;

    if(!theDoc)   theDoc   =   document;
    if(   (p   =   theObj.indexOf( "? "))   >   0   &&   parent.frames.length)
    {
        theDoc   =   parent.frames[theObj.substring(p+1)].document;
        theObj   =   theObj.substring(0,p);
    }
    if(!(foundObj   =   theDoc[theObj])   &&   theDoc.all)   foundObj   =   theDoc.all[theObj];
    for   (i=0;   !foundObj   &&   i   <   theDoc.forms.length;   i++)
        foundObj   =   theDoc.forms[i][theObj];
    for(i=0;   !foundObj   &&   theDoc.layers   &&   i   <   theDoc.layers.length;   i++)
        foundObj   =   findObj(theObj,theDoc.layers[i].document);
    if(!foundObj   &&   document.getElementById)   foundObj   =   document.getElementById(theObj);

    return   foundObj;
}

</script>
<style   type= "text/css ">
<!--
.ctrlbar   {
background:   #B2BFD2   url(images/bg_maincontent.gif)   left   repeat-y;
}
.explorer   {
background:   #B2BFD2;
border:   1px   solid   #B2BFD2;
}
.ctbutton   {
font-family:   Arial,   Helvetica,   sans-serif;
font-size:   8px;
background-color:   #eeeeee;
border-width:   1px;
width:   100px;
height:   10px;
margin-bottom:   1px;
}
-->
</style>
</head>
<body>

<table   width= "100% "   border= "1 ">

    <tr>
        <td   width= "100% "     align= "center "   valign= "top "   class= "explorer "   id= "menubar ">
        <iframe   name= "left "   width= "100% "   height= "100% "   scrolling= "no "   frameborder= "0 "   >
            <tr>
                    <td   width= "800 "   height= "60 "> <img   src= "images/top.jpg "   width= "800 "   height= "60 "> </td>
                    <td   width= "100% "   background= "images/top_line.gif "> &nbsp; </td>
                </tr>
        </iframe>
        </td>
    </tr>
   


    <tr>
        <td   height= "1 "   class= "ctrlbar ">
        <button   class= "ctbutton "   onFocus= "blur(); "   onMouseUp= "with(findObj( 'menubar ').style){display=display== 'none '? ' ': 'none ';this.innerText=display== 'none '? '> ': ' < '} "   onMouseOver= "this.style.backgroundColor= '#EFEFEF ' "   onMouseOut= "this.style.backgroundColor= '#E6E9EF ' ">
        </button> </td>
    </tr>
   
    <tr>
        <td   class= "explorer ">
        <iframe   name= "main "   id= "browserframe "   width= "100% "   height= "100% "   scrolling= "auto "   frameborder= "0 "   >
        </iframe>
        </td>
    </tr>
   
</table>
</body>
</html>

[解决办法]
帮顶
[解决办法]
总高度不变的情况下,下面的iframe向上移动?什么意思,是不是下面的iframe如果下面还有一个物体,位置也不动吗?
[解决办法]
关注
[解决办法]
up
[解决办法]
an ye ding

热点排行