• HTML超连接的使用


    1,基本语法:<a href="" target="打开方式" name =“页面锚点名称”>连接文字或者图片</a>

    2,属性

      a,href属性:链接的地址,链接的地址可以是一个网页,也可以是一个视频,图片,音乐等等

      b,target属性作用定义超连接的打开方式

      属性值:_blank在一个新的窗口中打开链接

          _seif(默认值)在当前窗口中打开链接

          _parent 在父窗口打开页面(框架中使用较多)

          _top 在顶层窗口中打开文件(框架中使用较多)

      c,name属性,指定页面的锚点名称

    eg:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>第七天</title>
    </head>
    <body>
    <a href="http://www.baidu.com" target="_top">百度</a><!--外部连接-->
    <a href="demo.html" target="_blank">demo的页面</a>
    <a href="http://www.baidu.com"><img src="https://www.baidu.com/img/baidu_jgylogo3.gif"></a>
    </body>
    </html>
  • 相关阅读:
    对学生排序 Exercise07_17
    消除重复 Exercise07_15
    计算gcd Exercise07_14
    随机数选择器 Exercise07_13
    dom4j 学习总结
    jQuery学习总结(二)
    jQuery学习总结(一)
    SQL中Where与Having的区别
    html + css (1)
    struts2+json
  • 原文地址:https://www.cnblogs.com/lzp1103/p/7795496.html
Copyright © 2020-2023  润新知