HTML中的target标签的属性值

    xiaoxiao2022-07-06  194

    HTML中的target标签的属性值

    target标签有四种不同的属性值

    //跳转到新的文档页面,也就是打开新的目标文档 <a target = "_blank"></a> //在当前页面进行跳转,是 a 标签的默认值 <a target = "_self"></a> //以文档在父窗口上的方式跳转,如果父窗口是window对象的话,那么效果和_self相同 <a target = "_parent"></a> //能够跳转出包含这个超链接的窗口 <a target = "_top"></a>

    也可以设置当前文档对象所有a标签的跳转方式

    只需要在当前文档对象的head标签中添加base标签

    <html> //设置了当前文档中所有的 a 标签的跳转方式为跳转到新的页面 <base target = "_blank"> </html> <body> </body>
    最新回复(0)