html - 如何打开和更改选项卡 onclick 事件 html 的焦点
问题描述
我正在尝试创建一个跨度,当用户单击它时,它应该打开并更改当前选项卡在新选项卡上的焦点,打开上一个选项卡中想要的链接,除了 chrome 移动版之外,一切正常
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<span data-href="https://clkde.tradedoubler.com/click?p=300883&a=3040124&g=24628776" class="BUTTON_NZV" style="border-radius: 7px;
color: #FFFFFF;
font-family: Arial;
font-size: 31px;
font-weight: 600;
padding: 15px;
background-color: #1BC325;
text-decoration: none;
display: inline-block;
cursor: pointer;
text-align: center;
" onclick="window.open('#','_blank');window.open(this.getAttribute('data-href'),'_self');">OK</span>
</body>
</html>
解决方案
推荐阅读
- python - 如何在单独的线程中实现阻塞监听功能,而main继续在Python中工作
- python - 使用 loc 的 Pandas 浮点值问题
- inheritance - Flutter:继承自抽象的无状态小部件
- laravel - Laravel 通知序列化问题
- spring - Axon 4 - 配置注入时未检测到 ProcessingGroup 注释类
- c++ - 带有行尾的 C++ 字符串以归档空行
- c# - 将图像保存到指定的 URL
- laravel - Laravel - 从请求中获取所有复选框值
- ubuntu - nginx:[警告] 0.0.0.0:80 上的服务器名称“myapp.com”冲突,忽略
- video-streaming - 如何创建由段组成的 RTSP 流?