<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";