【问题标题】:Command that click "Skip Ad" [closed]单击“跳过广告”的命令[关闭]
【发布时间】:2015-11-29 20:46:12
【问题描述】:

我正在尝试在此站点上运行 javascript 命令:http://cur.lv/r5pid 点击“跳过广告”,但它不起作用。 命令是这样的:document.getElementById('skip-ad')click()。 但我收到一条错误消息,声称 id skip-adnullUncaught TypeError: Can not read property 'click' of null (...)

有人可以帮忙吗? 谢谢。

【问题讨论】:

    标签: javascript command skip


    【解决方案1】:

    document 找不到这样的元素,因为它位于“iframe”中。您可以使用 document 找到 iframe,然后在 iframe 中找到想要的元素。例如:

    document.getElementById('myframe1').contentWindow.document.getElementById('x')

    参考(可能是副本):How to pick element inside iframe using document.getElementById

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-12
      • 1970-01-01
      • 2023-03-28
      • 2022-01-05
      • 1970-01-01
      • 1970-01-01
      • 2017-03-31
      • 1970-01-01
      相关资源
      最近更新 更多