搜索文章:

首页  |  Java技术  |  Asp.net  |  Asp编程  |  VC/C++  |  Delphi  |  VB编程

多窗口页面Frame

基本语法 

<frameset> ... </frameset>
<frame src="url"> 
<noframes> ... </noframes>
在 <noframes> 标记后的文字将只出现在不支持 frames 的浏览器中。

        <html>
        <head>
        </head>
        <frameset>
             <frame src="url">
             <noframes> ... </noframes>
        </frameset>
        </html>

 各窗口的尺寸设置 

<frameset cols=#>
纵向排列多个窗口: 
<frameset cols=30%,20%,50%>
<frame src="a.html">
<frame src="b.html">
<frame src="c.html">
</frameset>

示例

a  b  c  



<frameset rows=#>
横向排列多个窗口: 
<frameset rows=25%,25%,50%>
<frame src="a.html">
<frame src="b.html">
<frame src="c.html">
</frameset>

示例

a  
b  
c  



cols & rows
纵横排列多个窗口: 
<frameset cols=20%,*>
<frame src="a.html">
     <frameset rows=40%,*>
     <frame src="b.html">
     <frame src="c.html">
     </frameset>
</frameset>

示例

a  b  
c  



不允许各窗口改变大小 <frame noresize>
缺省设置是允许各窗口改变大小的。 


 各窗口间相互操作(frame target) 

窗口标识(frame name) 
<frame name=#>
<a href=url target=#> 
<frameset cols=50%,50%>
<frame src="a.html">
<frame src="b.html" name="hello">
</frameset>

示例

a  b  


特殊的 4 类操作(很有用喔)

<a href=url target=_blank> 新窗口
<a href=url target=_self> 本窗口
<a href=url target=_parent> 父窗口
<a href=url target=_top> 整个浏览器窗口
示例 



 frame 的外观(appearance) 

各窗口边框的设置 <frame frameborder=#> #=yes, no / 1, 0
<frameset rows=30%,*>
<frame src="acol.html" frameborder=1>
<frameset cols=30%,*>
     <frame src="bcol.html" frameborder=0>
     <frame src="ccol.html" frameborder=0>
</frameset>
</frameset>

示例

(a 有边框,b、c 没有) 
a  
b  c  


各窗口间空白区域的设置 
<frameset framespacing=#> #=空白区域的大小 
<frameset rows=30%,* framespacing=100>
<frame src="acol.html">
<frameset cols=30%,*>
     <frame src="bcol.html">
     <frame src="ccol.html">
</frameset>
</frameset>

示例

a  
b  c  


边框色彩 <frameset bordercolor=#> 
#=rrggbb 16 进制 rgb 数码, 或者是下列预定义色彩名称:
black, olive, teal, red, blue, maroon, navy, gray, lime, 
fuchsia, white, green, purple, silver, yellow, aqua 
<frameset rows=30%,* bordercolor=red>
<frame src="acol.html">
<frameset cols=30%,*>
     <frame src="bcol.html">
     <frame src="ccol.html">
</frameset>
</frameset>

示例

a  
b  c  


页面空白(margin) <frame marginwidth=# marginheight=#>
<frameset cols=50%,50%>
<frame src="a.html">
<frame src="a.html" 
    marginwidth=50 
    marginheight=50>
</frameset>

示例

aaaa  aa
aa  


卷滚条设置 <frame scrolling=#> #=yes, no, auto
#=缺省值是 auto。 


 浮动窗口(floating frame)

<iframe src=# name=##> ... </iframe> 
#=初始页面的 url
##=窗口标识(frame name)(之后可对此标识进行各窗口间相互操作)
... = 此处文字将只出现在不支持 frames 的浏览器中。
<center>
<iframe src="a.html" name="window">
   here is a floating frame
</iframe>
<br><br>
<a href="a.html" target="window">load a</a><br>
<a href="b.html" target="window">load b</a><br>
<a href="ccol.html" target="window">load c</a><br>
</center>

示例

display a.html  


load a
load b
load c

()

相关文章:
© 2006   www.java-asp.net