a: 锚元素

2017-06-05 14:19:00
admin
原创
303
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 <title>元素a</title>
 </head>
 <body>
 书签:<a name="doctop">文档顶端</a><hr>
 点击这个超链接将进入网站<a href="http://www.baidu.com">www.baidu.com</a><br>
 点击这个超链接将进入网站<a href="http://www.google.com">google</a><br>
a元素的href属性指向的URI协议不仅可以是"http://",还可以是“ftp://”、“news://”、“telnet”、“gopher”、“email”等;现在的浏览器都支持JavaScript,所以JavaScript伪协议“j a v a s c r i p t :”也是可以的;此外一般操作系统都带有邮件客户端软件,所以“mailto:”一般也是可以的;如果你装有QQ、MSN等即时通讯软件,那么这些软件也都有相应的伪协议。

图片也可以使用超链接,例如:<a href="http://www.w3.org" title="访问www.w3.org"><img src="/demo/src/html.gif" border="0"></a>


In the example that follows, the A element defines a link. The source anchor is the text "W3C Web site" and the destination anchor is "http://www.w3.org/":
For more information about W3C, please consult the <A href="http://www.w3.org/">W3C Web site</A>.
This link designates the home page of the World Wide Web Consortium. When a user activates this link in a user agent, the user agent will retrieve the resource, in this case, an HTML document.

in such a way as to make them obvious to users (underlining, reverse video, etc.). The exact rendering depends on the user agent. Rendering may vary according to whether the user has already visited the link or not. A possible visual rendering of the previous link might be:
For more information about W3C, please consult the W3C Web site. ~~~~~~~~~~~~
To tell user agents explicitly what the character encoding of the destination page is, set the charset attribute:
For more information about W3C, please consult the <A href="http://www.w3.org/" charset="ISO-8859-1">W3C Web site</A>

Suppose we define an anchor named "anchor-one" in the file "one.html".
...text before the anchor... <A name="anchor-one">This is the location of anchor one.</A> ...text after the anchor...<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="189" height="290">
 <param name="movie" value="/demo/src/bugs.swf"> <param name="quality" value="high">
 <embed src="/demo/src/bugs.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="189" height="290"></embed></object><a href="/demo/src/bugs.swf">下载</a>此动画</p>
<a href="mailto:feb12345@163.com?subject=阅读者反馈">发邮件给我</a> <a href="#doctop">回到文档顶端</a>
 </body>
 </html>
				
				
文章分类
联系我们
电话: 18902328227
Email: 2689701946@qq.com
QQ: 2689701946
微信: 18902328227
地址: 广州番禺区繁华路
  • 在线客服
  • 关注微信
  • 联系电话
    • 欢迎咨询
    • 欢迎加入QQ群 303257430
  • 公众号:源宝网络
    • 联系电话及微信号 18902328227