|
- <a href="delete.asp?id=22" onclick="return cal();">删除记录</a>
- <script>
- function cal()
- {
- let ArrQues = ['1+90=?', '33*2=?', '15/5=?','孙悟空是哪部电视剧的主角?']
- let ArrAns = [91, 66, 3,'西游记']
- let Index = Math.floor((Math.random()*ArrQues.length))
- var result=prompt(ArrQues[Index],"请填写答案");
- if (result== ArrAns[Index]) {
-
- return true;
- }
- else{
- alert('回答错误!');
- return false;
- }
- }
- </script>
复制代码 |
|