站内搜索

 

精品内容

html窗口的名称和链接

[ 来源:互联网 | 作者: | 时间:2008-05-10 | 浏览: 人次 ]

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

文件一:

<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>

文件二:

<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>
</html>

最新评论 共有有 0 位网友发表了评论

发表评论

评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名:(注册)
密码:
验证码:
匿名?