Javascript 基于用户选择的随机MCQ
我创建了一个由20个MCQ问题(在一页中)组成的测验。首先,用户必须选择他/她希望尝试的问题数量。这是我的两个单选按钮:Javascript 基于用户选择的随机MCQ,javascript,Javascript,我创建了一个由20个MCQ问题(在一页中)组成的测验。首先,用户必须选择他/她希望尝试的问题数量。这是我的两个单选按钮: <p>Choose the number of question you want to attempt at a time</p> 3 Question<input type="radio" name="radiobutton" onClick="load('expert1.html')"/><br> O
<p>Choose the number of question you want to attempt at a time</p>
3 Question<input type="radio" name="radiobutton" onClick="load('expert1.html')"/><br>
OR<br>
5 Question<input type="radio" name="radiobutton" onClick="load('expert1.html')" />
第一步:使用$\u获取参数
<p>Choose the number of question you want to attempt at a time</p>
3 Question<input type="radio" name="radiobutton" onClick="load('expert1.html?number=3')"/><br>
OR<br>
5 Question<input type="radio" name="radiobutton" onClick="load('expert1.html?number=5')" />
<p>Choose the number of question you want to attempt at a time</p>
3 Question<input type="radio" name="radiobutton" onClick="load('expert1.html?number=3')"/><br>
OR<br>
5 Question<input type="radio" name="radiobutton" onClick="load('expert1.html?number=5')" />
$numberOfQuestions = $_GET['number'];
// ...