V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
wdssmq
V2EX  ›  问与答

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

  •  
  •   wdssmq · 2021-06-11 18:46:28 +08:00 · 530 次点击
    这是一个创建于 1022 天前的主题,其中的信息可能已经有所发展或是发生改变。
    <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 上,但是搞不懂是怎么和弹出元素关联的。。

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2578 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:40 · PVG 23:40 · LAX 08:40 · JFK 11:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.