调用window.open函数时如何在span标签中select和属性

How to select and attribute in span tag when call window.open function

我有一个 span 标签,我想执行调用两个的 onclick 函数 window.open :

<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.data-href,'_self');">OK</span>

我想要的行为是在新选项卡中打开实际页面并聚焦它,并在不聚焦的情况下打开上一页中的数据 href link!你能帮我做吗?

使用thisgetAttribute功能。

<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>