以下是我的代码在Firefox中运行良好,但在chrome中没有.请告诉我如何解决这个问题.主要思想是根据选择框的选定值调用js函数:
<select onselect="question_type(this.value);" name="qtype" id="qtype" class="form-control input-lg" required>
<option value="">-- Select question type for this quiz --</option>
<option onclick="question_type(this.value);" value="mcq">1) MCQs</option>
<option onclick="question_type(this.value);" value="tf">2) True/False</option>
</select>
Run Code Online (Sandbox Code Playgroud)