wdssmq
V2EX  ›  问与答

「油猴脚本」万网域名查询时自动显示续费价格

  •  
  •   wdssmq · Jun 11, 2021 · 1073 views
    This topic created in 1811 days ago, the information mentioned may be changed or developed.
    <a class="renewal-price hidden-xs more-price">
      <div class="aps-tooltip">
        <span class="ext-price">
          <!-- react-text: 1538 -->更多价格<!-- /react-text -->
          <i class="icon icon-down"></i>
        </span>
        <span class="aps-state-hidden"></span>
      </div>
    </a>
    
        elMain.addEventListener("mouseover", function (element) {
          const elTarget = element.target;
          let elMore = null;
          if (elTarget.nodeName === 'LI') {
            elMore = elTarget.querySelector("a.renewal-price");
            console.log(elTarget, elMore);
          }
          if (elMore) {
            // 这里能关联到对应的 pop 元素
          }
        });
    

    监听事件应该是在 ext-price 上,但是搞不懂是怎么和弹出元素关联的。。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3254 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 12:04 · PVG 20:04 · LAX 05:04 · JFK 08:04
    ♥ Do have faith in what you're doing.