获取前145选择题
let ques=document.querySelectorAll(".question-content");
for(let i=0;i<145;i++){
let ans=ques[i].nextElementSibling.querySelectorAll(".correct-option>:nth-child(2)");
console.log(ques[i].innerText);
ans.forEach(item=>console.log(item.innerText));
}
获取后50道判断题
let ques=document.querySelectorAll(".question-content");
for(let i=145;i<195;i++){
let ans=ques[i].parentNode.querySelector(".correct-answer-content");
console.log(ques[i].innerText);
console.log(ans.innerText)
}
最新评论