多窗口页面(Frames)
上一篇 /
下一篇 2007-06-27 10:27:45
/ 个人分类:HTML
基本语法:
5c q;uj6z6^0
3t3t.mV/]lH0<frameset> ... </frameset>
y9b&`m+j0<frame src="url">
5G nr|&i7j;^#_:H0<noframes> ... </noframes>
51Testing软件测试网7l0g.@Df'd p c6U在 <noframes> 标记后的文字将只出现在不支持 FRAMES 的浏览器中。
(YI Z&]K8TL0<HTML>
<HEAD>
</HEAD>
<FRAMESET>
<FRAME SRC="url">
<NOFRAMES> ... </NOFRAMES>
</FRAMESET>
</HTML>
51Testing软件测试网-~X2O'q5O;a B51Testing软件测试网'b V ]N
l"s]{^R {h
各窗口的尺寸设置
51Testing软件测试网{!b(f`:C]51Testing软件测试网]4w X\ _$]-\
<frameset cols=#>
~[+s Z+Q0纵向排列多个窗口:51Testing软件测试网
T!E$h(}
PA1N
<frameset cols=30%,20%,50%>
<frame src="A.html">
<frame src="B.html">
<frame src="C.html">
</frameset>示例
Fv%p;Y'Y0Q\j([0
H yS:[*ppZ"K+x(Y0<frameset rows=#>
51Testing软件测试网QX%z)Wt横向排列多个窗口:
/@*Ph j
?E"a0<frameset rows=25%,25%,50%>
<frame src="A.html">
<frame src="B.html">
<frame src="C.html">
</frameset>示例
51Testing软件测试网;v"z@e,t\B7o#X7nKr
kW0COLS & ROWS
51Testing软件测试网d:^.I
M)CBy纵横排列多个窗口:51Testing软件测试网%}"W}4A%N} c
<frameset cols=20%,*>
<frame src="A.html">
<frameset rows=40%,*>
<frame src="B.html">
<frame src="C.html">
</frameset>
</frameset>示例
e5H#L'rM2I3{B0
+{+H-}|%\*]K5F$Yi0不允许各窗口改变大小 <frame noresize>
- 缺省设置是允许各窗口改变大小的。
51Testing软件测试网2tHnE _`V51Testing软件测试网]B b}9?2D
各窗口间相互操作(Frame Target)
51Testing软件测试网l#[6@y
Bd8O`StezEFO7H5n'K0窗口标识(Frame Name)
/sSr`k;lA0<frame name=#>51Testing软件测试网oTMM|-XXx
<a href=url target=#>
<frameset cols=50%,50%>
<frame src="A.html">
<frame src="B.html" name="HELLO">
</frameset>示例
@pl-F)}
l])y;Ww&M051Testing软件测试网&n$dfw;hUj
$h*m
SB;`1aFE0特殊的 4 类操作(很有用喔)
!`D qk7Y0
q|"j^ff!D*o0<a href=url target=_blank> 新窗口51Testing软件测试网J'Qk D{
<a href=url target=_self> 本窗口51Testing软件测试网-CT@`.rC
tj:J
<a href=url target=_parent> 父窗口51Testing软件测试网8[nO },DO^#\|
<a href=url target=_top> 整个浏览器窗口
;R:S&{c
Gj.G4H0E0示例
CZ5~TPtN@K,\051Testing软件测试网$Gn.qN&[-}
Rg51Testing软件测试网q9kU,r}_1_+e
Frame 的外观(Appearance)
6y&[U9H?u6U'GZ051Testing软件测试网N&p)X{*wA;l
f
各窗口边框的设置 <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软件测试网S%|5]?"A7vi(A 有边框,B、C 没有)
`
h)I%r%`'KD/P"Q$m0
51Testing软件测试网2HXu,rQ$L_S h/pJ4aen't4R2OG/Q5t0各窗口间空白区域的设置
{O,o7^x qZ&g
c(Y0<frameset framespacing=#> #=空白区域的大小
<frameset rows=30%,* framespacing=100>
<frame src="Acol.html">
<frameset cols=30%,*>
<frame src="Bcol.html">
<frame src="Ccol.html">
</frameset>
</frameset>示例
CW7NB#i"A-Ff*n,F0
5p(U/|
v;f0Ys0边框色彩 <frameset bordercolor=#>
- #=rrggbb 16 进制 RGB 数码, 或者是下列预定义色彩名称:51Testing软件测试网9p"k d3V8A C!r'~
Black,Olive,Teal,Red,Blue,Maroon,Navy,Gray,Lime,51Testing软件测试网dP1A`.U1Hg&x
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>示例
51Testing软件测试网:qb7p"p nb2z_OG.qp W#~_NIW0页面空白(Margin) <frame marginwidth=# marginheight=#>
<frameset cols=50%,50%>
<frame src="A.html">
<frame src="A.html"
marginwidth=50
marginheight=50>
</frameset>示例
AAAA | AA51Testing软件测试网Z*jW[
Kn AA |
f+Gh;ab0
)e1U(@*G:uz0卷滚条设置 <frame scrolling=#> #=yes, no, auto
- #=缺省值是 auto。
51Testing软件测试网
Yq
k-c.i;| v5@?*r#OC
5zS
\ n-o6y0浮动窗口(Floating Frame)
51Testing软件测试网+K?KA'Fs51Testing软件测试网qX(c-nB&QiF1A
<iframe src=# name=##> ... </iframe>
.K8f,E$]#]&xB0a
?r0#=初始页面的 URL51Testing软件测试网C#S(n-[
l s1SQ6Q
##=窗口标识(Frame Name)(之后可对此标识进行各窗口间相互操作)51Testing软件测试网YN#F2DN6m ^ x8k
... = 此处文字将只出现在不支持 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>示例
51Testing软件测试网,HA2?4l.oQ 51Testing软件测试网5iN0?/j6\r Load A51Testing软件测试网d9Z9ns ne3OX Load B
x/nx_C Bs,Q~0Load C 9@l8|~
s5qlU*A0 :fE;Ao-I/P2{d6D0 |
收藏
举报
TAG:
HTML