多窗口页面(Frames)

上一篇 / 下一篇  2007-06-27 10:27:45 / 个人分类:HTML

基本语法:51Testing软件测试网*X~/?zSAM)v{ c

fL\*[`1Bm0

<frameset> ... </frameset>
8p"u K l*q5wU7n^;In0<frame src="url">51Testing软件测试网.K urq.V0a
<noframes> ... </noframes>

51Testing软件测试网7Y3{-A#tc&A

在 <noframes> 标记后的文字将只出现在不支持 FRAMES 的浏览器中。51Testing软件测试网&]@|xf r wV

<HTML>
        <HEAD>
        </HEAD>
        <FRAMESET>
             <FRAME SRC="url">
             <NOFRAMES> ... </NOFRAMES>
        </FRAMESET>
        </HTML>
51Testing软件测试网OvG*h%l%t

U O#V!H#Iq0

各窗口的尺寸设置

51Testing软件测试网T;UOO AO&v

51Testing软件测试网+Aq.J#Qa F7M%G+V3P

<frameset cols=#>

51Testing软件测试网WAP PX(Vj

纵向排列多个窗口:

s6P,gvX)lv{0
<frameset cols=30%,20%,50%>
<frame src="A.html">
<frame src="B.html">
<frame src="C.html">
</frameset>示例
A C
51Testing软件测试网X	Wl	F*Kp

51Testing软件测试网B]6|&Du

<frameset rows=#>

51Testing软件测试网?z| l'V{bt9i

横向排列多个窗口:

Nh;\ h|:P`0
<frameset rows=25%,25%,50%>
<frame src="A.html">
<frame src="B.html">
<frame src="C.html">
</frameset>示例
A
B
C
51Testing软件测试网5]:R\'t!j,E1K

51Testing软件测试网Gp3l,PEQETqb

COLS & ROWS

51Testing软件测试网rg5O(SZ|,@Vz6[{

纵横排列多个窗口:51Testing软件测试网sn`(s)ua

<frameset cols=20%,*>
<frame src="A.html">
     <frameset rows=40%,*>
     <frame src="B.html">
     <frame src="C.html">
     </frameset>
</frameset>示例
AB
C

8gU\7B,z9E scN0

,q,vX qa&r0

不允许各窗口改变大小 <frame noresize>

缺省设置是允许各窗口改变大小的。

0p(Yd'R h051Testing软件测试网;@`pjt d

各窗口间相互操作(Frame Target)

51Testing软件测试网 UF.yJB{O5I|

51Testing软件测试网^} _%A9rq]

窗口标识(Frame Name)51Testing软件测试网gh/P!e OX7To
<frame name=#>
H|M(v-Y!i0<a href=url target=#>

<frameset cols=50%,50%>
<frame src="A.html">
<frame src="B.html" name="HELLO">
</frameset>示例
AB
51Testing软件测试网CL.R!})sNH

51Testing软件测试网8k;]:i{Rv

51Testing软件测试网9DE.El:JG

特殊的 4 类操作(很有用喔)
5c5h8GU}E#B)HQk|0

|4LCHen0

<a href=url target=_blank> 新窗口
_Z d'S#CT9[!lJDw0<a href=url target=_self> 本窗口
C1NZ mv!{o0<a href=url target=_parent> 父窗口51Testing软件测试网j4aK$V OjG7F}
<a href=url target=_top> 整个浏览器窗口

@&fZ2Q,O,o:H c&k0示例

&??|kyb,Ep @0
51Testing软件测试网d,gv+I2k0@	du+|.V

yg6M6|0?0

Frame 的外观(Appearance)

51Testing软件测试网b[!h}J#|

51Testing软件测试网4V@)b;tR2l-tF3`

各窗口边框的设置 <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>示例
51Testing软件测试网 LNsz2S9k

(A 有边框,B、C 没有)

;@M {!O\ RDL.I{6r0
A
BC

Zj4U1qQ @}051Testing软件测试网,L'T2V{%D/[ o0x

各窗口间空白区域的设置
k6W-gxH^0<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
BC

Ts&i.i3y3u*Iw0

o7F"\,f(C/nA3U[ P0

边框色彩 <frameset bordercolor=#>

#=rrggbb 16 进制 RGB 数码, 或者是下列预定义色彩名称:
F@!h&E{H0Black,Olive,Teal,Red,Blue,Maroon,Navy,Gray,Lime,51Testing软件测试网y2VW)J/Xq2En
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
BC

V L;X_D5h3i051Testing软件测试网H+M)g?0r rv

页面空白(Margin) <frame marginwidth=# marginheight=#>

<frameset cols=50%,50%>
<frame src="A.html">
<frame src="A.html" 
    marginwidth=50 
    marginheight=50>
</frameset>示例
AAAAAA
h){:^+C;kW0AA

wH ^X9W-f;Z0

r&O2[Q3y_Y0

卷滚条设置 <frame scrolling=#> #=yes, no, auto

#=缺省值是 auto。

}Oz2R-Rd@tcE@3[%h0

c:W a3nii2?+^0

浮动窗口(Floating Frame)

51Testing软件测试网+FM v/Ae+@b T0M.~P

\%E8tx0x0

<iframe src=# name=##> ... </iframe>51Testing软件测试网az o x.?R1WR)U |
#=初始页面的 URL
[Au0F2p2Hl&]0##=窗口标识(Frame Name)(之后可对此标识进行各窗口间相互操作)51Testing软件测试网 KHb@9N
... = 此处文字将只出现在不支持 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
51Testing软件测试网?BlF_Y2d9_|


2Y Qr+gW0Load A
?)f9d$Gs0Load B
[I&lQk7dFp0Load C

? |7?1z2ck(l8q0

*d*xG^7A'W|+i2h&R,I(Q0

相关阅读:

TAG: HTML

 

评分:0

我来说两句

Open Toolbar