視頻操作
$('video')[0].play();
let i = 1;
let timer = setInterval(function(){
if($('#layui-layer-shade1').get(0) || $('#layui-layer1').get(0) ){
$('#layui-layer-shade1,#layui-layer1').remove();
console.log("驗(yàn)證碼被干掉了");
$('video')[0].play();
}else{
console.log("已經(jīng)過去了" +(i++)*0.5 + "分鐘");
}
let duration = $('video')[0].duration;
let currentTime = $('video')[0].currentTime;
if(currentTime==duration){
clearInterval(timer);
console.log("恭喜你,視頻已學(xué)完!");
}else{
let remainder = (duration-currentTime)/60;
remainder = remainder.toFixed(1);
console.log("視頻學(xué)習(xí)還剩" + remainder + "分鐘");
}
}, 30000);
圖文學(xué)習(xí)
function picContent(){
let box = $('#maincontent');
let p = $(box).children();
let num = 1;
let hold = $('#ware_time');
let timer = setInterval(()=>{
box.scrollTop(num*20)
console.log("滾動(dòng)條位置:" + box.scrollTop());
if(hold.css('display')=="none"){
clearInterval(timer);
console.log("學(xué)習(xí)完成");
}
if($('#layui-layer-shade1').get(0) || $('#layui-layer1').get(0) ){
$('#layui-layer-shade1,#layui-layer1').remove();
console.log("驗(yàn)證碼被干掉了");
}
num += 10;
}, 2000);
}
內(nèi)容讀取
let mulu = $('#mululist').children();
let arr_herf = [];
for (let i=0;i<mulu.length;i++){
var title = mulu[i];
var a_href = $(title).children().attr('href');
arr_herf.push(a_href);
}
for(let item of arr_herf){
eval(item);
if($('.layui-layer-btn1')){
$('.layui-layer-btn1').click();
}
picContent();
}
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。