欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Lesson01_05 HTML中的超链接

程序员文章站 2023-12-21 17:16:28
  格式: 代码:lonc...
 

格式:<a href=" "></a>

代码:<a hrer="http://www.loncer.cn">loncer's blog</a>

效果:loncer'blog

可以用来启动邮件发送:

代码:<a hrer="mailto:thinkme722@gmail.com?subject=问个问题">loncer'semail</a>

效果:loncer'email

  • target属性:

     

    例如:在新窗口中打开:

    代码:<a hrer="http://www.loncer.cn" target="_blank">loncer's blog</a>

    效果:loncer'blog

     

     

     

  • name属性:指写打开时的显示地点

     

    如果是在同一页中转则如下:
    1、先在要跳到的地方用:<a name="markname">
    2、再在要跳转的地方用:<a href="#markname">跳转到markname处</a>

    例如:
    代码:<a href="#markname">跳转到markname处</a>
    效果:
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    jjvvjjvvjjvvjjvvjjvvjjvvjjvv
    他娘的有完没有……汗
    跳到这里了,代码如下:
    <a name="markname">

    如果是在不同的页面转则如下:
    1、先在要跳到xxxx.html网页中的指定地方用:<a name="markname">
    2、再在要跳转的地方用:<a href="xxxx.html#markname">跳转到xxxx.html的markname处</a>

    如果是要转到本页则如下:
    <a href="#">自己</a>


    特别的如下: <a href="">指向的是文件所在目录</a>

    注:如果文件是放在服务器上则打开目录下的默认文件

  • 上一篇:

    下一篇: