2008-04-22
HTML 超级链接实例
关键字: html
创建超链接
图像超链接
在新的浏览器窗口打开链接
链接到同一个页面的不同位置
跳出框架
创建电子邮件链接
创建电子邮件链接 2
<html> <body> <p> <a href="/index.html"> This text</a> is a link to a page on this Web site. </p> <p> <a href="http://www.microsoft.com/"> This text</a> is a link to a page on the World Wide Web. </p> </body> </html>
图像超链接
<html> <body> <p> You can also use an image as a link: <a href="/example/html/lastpage.html"> <img border="0" src="/i/eg_buttonnext.gif" width="65" height="38"> </a> </p> </body> </html>
在新的浏览器窗口打开链接
<html> <body> <a href="/example/html/lastpage.html" target="_blank">Last Page</a> <p> If you set the target attribute of a link to "_blank", the link will open in a new window. </p> </body> </html>
链接到同一个页面的不同位置
<html> <body> <p> <a href="#C4">See also Chapter 4.</a> </p> <h2>Chapter 1</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 2</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 3</h2> <p>This chapter explains ba bla bla</p> <h2><a name="C4">Chapter 4</a></h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 5</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 6</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 7</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 8</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 9</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 10</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 11</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 12</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 13</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 14</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 15</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 16</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 17</h2> <p>This chapter explains ba bla bla</p> </body> </html>
跳出框架
<html> <body> <p>Locked in a frame?</p> <a href="http://www.w3school.com.cn/" target="_top">Click here!</a> </body> </html>
创建电子邮件链接
<html> <body> <p> This is a mail link: <a href="mailto:someone@microsoft.com?subject=Hello%20again"> Send Mail</a> </p> <p> <b>Note:</b> Spaces between words should be replaced by %20 to <b>ensure</b> that the browser will display your text properly. </p> </body> </html>
创建电子邮件链接 2
<html> <body> <p> This is another mailto link: <a href="mailto:someone@microsoft.com?cc=someoneelse@microsoft.com&bcc=andsomeoneelse2@microsoft.com&subject=Summer%20Party&body=You%20are%20invited%20to%20a%20big%20summer%20party!">Send mail!</a> </p> <p> <b>Note:</b> Spaces between words should be replaced by %20 to <b>ensure</b> that the browser will display your text properly. </p> </body> </html>
发表评论
- 浏览: 3759 次
- 性别:

- 来自: 深圳

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
Rails2之Depot
用上了restful的scaffold最好把admin换成名字空间,下面做pro ...
-- by neodoxy -
Rails2之Depot
要是可以用radrails 来展示就更好了...
-- by antony_jiang -
听说Rails 2.1有个Time Z ...
楼主用的竟然是Mac
-- by Dreamer -
听说Rails 2.1有个Time Z ...
在2.0版本中就已经有了;
-- by PBFox -
听说Rails 2.1有个Time Z ...
确实之前就有了,不过Rails 2.10是Built-in的 多了一些新特性, ...
-- by t0uch






评论排行榜