需求:自動(dòng)勾選【入群時(shí)間】與【最后發(fā)言】時(shí)間相同的19位成員。
步驟:
1、排序:點(diǎn)擊【最后發(fā)言↑】
2、加人:默認(rèn)情況下列表中只有20人,因此向下拖滾動(dòng)條,增加列表中顯示人數(shù)
3、代碼:按【F12】調(diào)出【開發(fā)者工具】,在【控制臺(tái)】中粘貼下列代碼并回車
{
let trs = $(".list>tr");
let count = 0;
for (let i = 0; i < trs.length && count < 19; i++) {
if (trs[i].cells[7].outerText === trs[i].cells[9].outerText) {
trs[i].cells[0].children[0].checked = true;
count++;
}
}
}