How to?

click all invite

May 21, 2024
websitezhihu
1 Minutes
60 Words
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.

click all invite

1
// 获取所有按钮
2
const allButtons = document.getElementsByTagName('button');
3
4
// 遍历所有按钮
5
for (let i = 0; i < allButtons.length; i++) {
6
// 检查按钮文本是否包含 '邀请回答'
7
if (allButtons[i].textContent.includes('邀请回答')) {
8
// 模拟点击事件
9
allButtons[i].click();
10
}
11
}
Article title:click all invite
Article author:Julyfun
Release time:May 21, 2024
Copyright 2026
Sitemap