方法1:
在页面head标签中插入代码实例:- <head>
- <base target="_blank" />
- </head>
- <body>
- <a href="https://tuyuanma.com">兔源码</a>
- </body>
复制代码 语法:- <base target="_blank">
- 或
- <base target="value">
复制代码
方法2:
通过CSS样式定义实现
- <style type="text/css">
- <!--
- .tuyuanma1 a:active {test:expression(target="_blank");}
- }
- -->
- </style>
- <div class="tuyuanma">
- <a href="https://tuyuanma.com/">tuyuanma.com</a> 本窗口打开
- </div>
- <div class="tuyuanma1">
- <a href="https://tuyuanma.com/">tuyuanma.com</a> 新窗口打开
- </div>
复制代码 方法3:
通过JS的方式来实现,这里未作测试,如有需要,请自行百度。 |