0

jQuizMe 使测验成为多项选择

当我选择它(我要回家)用“未定义”字显示它时,她有 2 个错误答案,我不想显示这个字,她是代码:

    <script language="javascript">

    var quiz4 = [
        {
        "ques":"    How are you?", 
        "ans":"I'm fine ", 
        "ansSel":["Thank you", "I'm going home"],
        "feeds":[""], "wrongFeed":"" , "rightFeed":" "
        }


    ]; 
     var options = { "quizType":"multiplyChoiceOl", "showWrongAns":true ,"Great good job" :'<font color=green>Right Answer</font>',"wrong":"Wrong answer, try again","empty":"<font color=red>please choose your answer</font>","title":' ', "finished_msg":""}  ;
    $( "#quiz_div" ).jQuizMe( quiz4, options);
</script>

有什么帮助吗?

4

1 回答 1

0

对不起,但我不明白你的问题。能否请您改写一下。

无论如何,问题似乎在于您使用的是 jQuizMe 的修改版本。我怎么知道?如果测验输入的任何元素未知,jQuizMe 将显示错误消息而不是测验。

我更正了您的输入以允许测验运行,但在您改写问题并提供自定义脚本之前,我只能这样做。

资源:

$(function () {
  var quiz4 = [{
      "ques": "    How are you?",
      "ans": "I'm fine ",
      "ansSel": ["Thank you", "I'm going home"] //,
      //"feeds":[""], "wrongFeed":"" , "rightFeed":" " // unknown keys
  }];
  var options = {
      "quizType": "multipleChoiceOl", // this was misspelled
      "showWrongAns": true,
      "Great good job": '<font color=green>Right Answer</font>',
      "wrong": "Wrong answer, try again",
      "empty": "<font color=red>please choose your answer</font>",
      "title": ' ',
      "finished_msg": ""
  };
  $("#quiz_div").jQuizMe(quiz4, options);
});

演示:http: //jsfiddle.net/eAFkr/

于 2013-08-11T21:00:36.867 回答