6

微信读书网页版如何 模拟 点击 下一页 按钮 ?

 3 years ago
source link: https://www.v2ex.com/t/808630
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  程序员

微信读书网页版如何 模拟 点击 下一页 按钮 ?

  975779964 · 9 小时 55 分钟前 · 256 次点击

如题 ,我在 chrome 上面用微信读书 ,用了 surfingkeys 插件 ,按 f 模拟点击 下一页按钮 没有反应,然后我又在 设置里面 设置 快捷键

mapkey('<Space>','微信读书下一页',()=>{
    let btn = document.getElementsByClassName('readerFooter_button');
    console.log(btn[0]);
    btn[0].click(); 
},{domain:/weread\.qq/i});

打印出来了 下一页按钮 ,但 就是 click() 事件没有反应 我在 chrome devtools 里面 也试了 不行 ,是不是 微信读书 的下一页按钮 就 没有 写 onClick 事件啊? 点是 正常用鼠标点 下一页 是可以 翻页的 ,我应该如何 用代码来模拟 下一页的点击呢?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK