标签:style timeout div reload inner str function before 第一步
第一步:在电脑浏览器打开网址 document.write(‘<iframe width=100% height=100% frameborder=0 scrolling=yes>‘);
frames[0].location.href = location.href;
var idx = 0;
var o = document.createElement(‘div‘);
o.innerHTML = ‘第0次‘;
o.setAttribute(‘id‘, ‘setTimes‘);
o.setAttribute(‘style‘, ‘text-align: center;font-size: 14px;background: #000;color: #fff;padding: 10px 0;‘);
document.body.insertBefore(o, document.body.childNodes[0]);
var timer = setInterval(function () {
if (idx > 40) {
clearInterval(timer);
document.getElementById(‘setTimes‘).innerHTML = ‘已结束‘
} else {
document.getElementById(‘setTimes‘).innerHTML = ‘第‘ + idx + ‘次‘;
refresh()
}
}, 13000);
function refresh() {
setTimeout(function () {
frames[0].document.getElementsByClassName(‘svelte-qr71gg‘)[1].click();
setTimeout(function () {
frames[0].location.reload()
}, 1000)
}, 12000);
idx++
}
refresh();
标签:style timeout div reload inner str function before 第一步
原文地址:https://blog.51cto.com/13559120/2408270