Dec*_*and 1 javascript twitter jquery click button
我多年来一直试图让我的脚本发挥作用,但它就是不成功!我试图在 5 秒后点击我的 Twitter/关注页面上的所有“取消关注”按钮。这是我的代码,没有 setInterval 函数:
var buttonArray = document.getElementsByClassName('w-button-common w-button-unfollow'); for(var a=0;a<buttonArray.length;a++){ buttonArray[0].click(); }
Run Code Online (Sandbox Code Playgroud)
以下是取消关注按钮的 Twitter HTML DOM 代码:
<span class="w-button-common w-button-unfollow"><input alt="Follow" src="https://ma.twimg.com/twitter-mobile/97bb0ca1daa74ae65fd470b1961897275eb91579/images/sprites/followchecked.gif" type="image"></span>
<input type="hidden" name="scribe_item" value="description=list&id=1875185790&item_type=3">
</form>
</td>
Run Code Online (Sandbox Code Playgroud)
如果有人可以修改我的代码,我将不胜感激!提前非常感谢!
小智 5
使用 jquery 你可以像这样使用...
$('.w-button-common.w-button-unfollow').click()
Run Code Online (Sandbox Code Playgroud)
这两个类都在同一个元素上。所以,类之间不应该有任何空格
| 归档时间: |
|
| 查看次数: |
5107 次 |
| 最近记录: |