<script type="text/javascript"> //判读答案是否正确 function answerCorrect(questionNumber, answer) { var correct = false; if (answer == answer[questionNumber]) correct = true;
return correct; }
//定义问题数组和答案数组,用以存储题目和选项 var questions = new Array(); var answers = new Array();
//定义问题1,将索引为0的成员定义成二维数组 questions[0] = new Array();
//题目,定义二维数组成员 questions[0][0] = "the Beatles were:"; //答案 questions[0][1] = "A Sixties rock group from Liverpool"; questions[0][2] = "Four musically gifted insected"; questions[0][3] = "German Cars"; questions[0][4] = "I don't know";