Dreamweaver | Flash | Photoshop | Fireworks | Asp | Asp.net | Css/HTML | 矢量教程 | Access | Sql Server
网页设计视频教程

你的位置:首页>>HTML学习教程>>窗口的名称和链接

窗口的名称和链接

发表时间:2006-11-19 23:03:09浏览次数:

    如果在窗口中要做链接,就必须对每一个子窗口命名,以便于被用于窗口间的链接,窗口命名要有一定的规则,名称必须是单个英文单词,允许使用下滑线,但不允许使用"—","句点"和空格等,名称必须以字母开头,不能使用数字,还不能使用网页脚本中保留的关键字,在窗口的链接中还要用到一个新的属性"targe",用这个属性就可以将被链接的内容放置到想要放置的窗口内。

下面的实例就是窗口内的命名和链接方法

    文件一中的片断代码格式为:

     <a href="sl1.html" target="aa2">爱在深秋</a>
     <a href="sl2.html" target="aa3">图像对文字的水平居中</a>
     <a href="sl3.html" target="aa2">图像与文本之间的距离</a>
     <a href="sl4.html" target="aa3">图像大小的设定</a>
     <a href="http://www.sina.com.cn" target="aa3">新浪网站</a>

   文件二的片断代码格式为:

     <frame src="ml.html" name="aa1">
     <frame src="sl1.html" name="aa3">
     <frame src="sl2.html" name="aa2" noresize="noresize">

文件一:

ml.html

<html>
<head>
<title>无标题文档</title>
</head>
<body>
<center>
<h2>目录</h2>
<hr>
<p><a href="sl1.html" target="aa2">爱在深秋</a></p>
<p><a href="sl2.html" target="aa3">图像对文字的水平居中</a></p>
<p><a href="sl3.html" target="aa2">图像与文本之间的距离</a></p>
<p><a href="sl4.html" target="aa3">图像大小的设定</a></p>
<p><a href="http://www.sina.com.cn" target="aa3">新浪网站</a></p>
</center>
</body>
</html>

文件二:

sl94.html

<html>
<head>
</head>
<frameset cols="20%,*,200" framespacing="1" frameborder="yes" border="1" bordercolor="#99CCFF">
<frame src="ml.html" name="aa1">
<frame src="sl1.html" name="aa3">
<frame src="sl2.html" name="aa2" noresize="noresize">
</frameset><noframes></noframes>

网站建设服务 - 友情链接 - 意见建议 - 联系站长 - 论坛 - 网站导航
Copyright 2006-2007 zznj.com Inc. All Rights Reserved
Emai:skyzznj@126.com