frameset 用法示例

基本用法:

<frameset rows="20%,*">
    <!--水平划分的第一个部分加载sample25_top.htm文件-->
    <frame src="sample_top.htm" name="top">
    <!--水平划分的第二个部分并没有加载文件,是再垂直划分为两个部分-->
    <frameset cols="30%,*">
       <!--垂直划分的第一个部分加载sample25_left.htm文件-->
       <frame src="sample_left.htm" name="left">
       <!--垂直划分的第二个部分加载sample01.htm文件-->
       <frame src="index.htm" name="right">
    </frameset>
 </frameset>

 

示例:

<FRAMESET id="fsTop" border="0" frameSpacing="0" rows="106,*" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" cols="*">
  <FRAME border="0" name="title" marginWidth="0" marginHeight="0" src="Top/Top.aspx" frameBorder="no" noResize scrolling="no" topmargin="0" leftmargin="0" borderColor="#e4e4e4">
    <FRAMESET border="0" name="search" frameSpacing="0" frameBorder="1" cols="190,*" topmargin="0" leftmargin="0" rightmargin="0"             marginheight="0" marginwidth="0">
     <FRAME border="0" name="leftFrame" src="Left/Left.aspx?AuthorityId=01" marginWidth="0" marginHeight="0" frameBorder="0" topmargin="0" leftmargin="0" target="mainFrame" scrolling="no" noResize borderColor="#e4e4e4"  >

     <FRAME  style=" BORDER-LEFT: #ffffff 0px groove"  name="mainFrame" src="index.aspx"  id="mainFrame" borderColor="#e4e4e4" frameBorder="no" scrolling="auto" marginwidth="0" marginheight="0">
   
    </FRAMESET>
 </FRAMESET>

 

加强版(左边可伸缩)

<table border="0" cellpadding="0" cellspacing="0" style="height: 100%" width="100%" bgcolor="">
 <tr style="height:107px ">
     <td colspan="3">
         <iframe  frameborder="0" id="Iframe3" name="title"  marginwidth="0" marginHeight="0"  margin-top="0"
                src="Top/Top.aspx"   noresize scrolling="no"topmargin="0" leftmargin="0"
                style=" margin-top:0;HEIGHT: 100%; WIDTH: 100%; Z-INDEX: 1;"
                align="top">
</iframe>
     </td>
 </tr>

    <tr height="100%">
        <td height="100%" width="220" align="middle" valign="center" id="frmLeft" name="frmLeft"
            class="style1">
            <iframe frameborder="0" id="leftFrame" name="leftFrame" src="Left/Left.aspx?AuthorityId=01" target="mainFrame" scrolling="auto" noresize  style="HEIGHT: 100%; WIDTH: 195px; Z-INDEX: 1">
             </iframe>
        </td>
        <td height="100%" width="10" valign="top" align="center" class="style1">
           <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%" borderColorDark=#ffffff bgColor=#B6C4E6 borderColorLight=#000000>
                <tr>
                    <td height="100%" style="width: 12px"><a style="cursor:hand" onClick="switchMenu()" id="banner"><img src="Image/MenuHide.gif"width="11" height="39" border="0" alt="隐藏菜单"></a></td>
                </tr>
            </table>
        </td>
        <td height="100%" width="100%" class="style1">
            <table  height="100%" width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="100%" height="100%">
                                    <iframe frameborder="0" id="mainFrame" name="mainFrame" src="index.aspx" scrolling="auto" noresize  style="HEIGHT: 100%; WIDTH: 100%; Z-INDEX: 1">
                                        </iframe>
                                </td>
                            </tr>
                        </table>
        </td>
    </tr>
</table>

posted @ 2010-07-18 16:03  海乐学习  阅读(3277)  评论(0编辑  收藏  举报