大半年前就写好的东西。也很早上传到了 GitHub ,由于某些考虑所以到现在才写到 blog 里(虽然这段代码应该早就传遍大山南北了)。。。
- 打开 C++ 刷题页面;
- 选择需要刷题的章节;
- 打开浏览器 JavaScript 控制台(F12 – Console),复制粘贴下面的代码并运行;
- Enjoy it!
function getAnswer(){var a,b,c;for(a=0;3>=a;a++)if(b="<cTestParam><cQuestion>"+$f3.cQuestionID.value+"</cQuestion><cUserAnswer>"+choices[a]+"</cUserAnswer></cTestParam>",c=$f3.CExam.CPractice.IsOrNotTrue(b),c.value)return choices[a]}function choose(){$f3.makeChoice(getAnswer()),setTimeout("choose()",2700)}var $f3=window.frames["topmain"].frames["main"],choices=new Array("A","B","C","D");choose();