鷹翔宇空

          學習和生活

          BlogJava 首頁 新隨筆 聯系 聚合 管理
            110 Posts :: 141 Stories :: 315 Comments :: 1 Trackbacks

          下面的是左右框架可以動態拉動的源代碼
          <html>
          ? <head>
          ??? <title>scollingConsole</title>
          ??? <script language="javascript">


          function bringToTop() {
          ??? if( self != top ) {
          ????? top.location.href = self.location.href;
          ??? }
          }

          ??? </script>

          ? </head>

          ? <frameset onload='javascript:bringToTop();' cols='240,*' frameborder=yes frameborder=5 name='TrampEagle'>
          ? ?
          ??? <frame src='' name='hyq' scrolling='no' marginheight='0' marginwidth='0' >

          ??? <frame src='' name='312' marginheight='0' marginwidth='0'>
          ??
          ? </frameset>

          ? <noframes>
          ??? <body bgcolor=white text='#666666'>

          ????? <center><H3>Please use a frames-capable browser</H3></center>
          ??? </body>
          ? </noframes>

          </html>


          ?其實很簡單的,但是以前總以為很神秘,以為要搞很多代碼去實現這個功能。如果不希望拉動,也很簡單,就是在frame 屬性后再加一個NORESIZE就可以了,如:<frame src='' name='hyq' scrolling='no' marginheight='0' marginwidth='0' NORESIZE?>,三個框架的和這個同理,事例如下:

          <html>
          ? <head>
          ??? <title>scollingConsole</title>
          ??? <script language="javascript">


          function bringToTop() {
          ??? if( self != top ) {
          ????? top.location.href = self.location.href;
          ??? }
          }

          ??? </script>

          ? </head>
          <FRAMESET ROWS="150,*">
          ?<FRAME NAME="Frame1" FRAMEBORDER=1 SCROLLING="Yes" NORESIZE>
          ?<FRAMESET onload='javascript:bringToTop();' COLS="240,*">
          ??<FRAME scrolling='no' marginheight='0' marginwidth='0'>
          ??<FRAME name='312' marginheight='0' marginwidth='0'>
          ?</FRAMESET>
          </FRAMESET>

          ? <noframes>
          ??? <body bgcolor=white text='#666666'>

          ????? <center><H3>Please use a frames-capable browser</H3></center>
          ??? </body>
          ? </noframes>

          </html>


          ?

          posted on 2006-04-22 15:21 TrampEagle 閱讀(742) 評論(0)  編輯  收藏 所屬分類: 學習體會
          主站蜘蛛池模板: 华安县| 罗甸县| 襄垣县| 焉耆| 名山县| 隆林| 股票| 乌鲁木齐县| 图片| 新蔡县| 汾西县| 桂林市| 呼和浩特市| 景宁| 上饶市| 威宁| 高平市| 鄂州市| 贞丰县| 安徽省| 黄大仙区| 黎川县| 桂东县| 石嘴山市| 曲沃县| 饶阳县| 松阳县| 宁波市| 新兴县| 黄冈市| 蕉岭县| 黄梅县| 通许县| 德清县| 朝阳市| 建水县| 浦北县| 平谷区| 蓬安县| 巴彦淖尔市| 宣化县|