js中在试卷中,提交答案之后,如果一道题为空,我想让他回到这个没有答题的地方
<div class="test_title">
<h1 style="width: 330px;">
<a name="part1">Listening comprehension</a></h1>
</div>
<div class="test_con">
Look at the pictures. Listen and tick the best answer. Here is an example.
<br>
Example:<br />
<p>
How old is Lucy?</p>
<p>
<img src="images/img_x1_01.png" width="419" height="140" /></p>
<div class="answer">
<ul id="ul1">
<span>答案:</span>
<input name="radio" type="radio" value="1" id="1" onclick="radio_click('ul1',1)"
class="nav_1" />
<label class="btn_1" value="" onclick="lable_click('ul1',1,1)">
</label>
<input name="radio" type="radio" value="2" id="2" onclick="radio_click('ul1',2)"
class="nav_1" />
<label class="btn_2" value="" onclick="lable_click('ul1',2,2)">
</label>
</ul>
</div>
function Valid_Question(){
//第一道题非空验证
var firstnum=0;
//首先计算出你点击radio的值是多少
var a=$("input[name='radio'][checked]").val();
//然后判断你点击的按钮的值和正确答案按钮的值是否一致
if($("[name='radio']:checked").length > 0){
if(a=='3'){
firstnum+=2;
}else{
firstnum=0;
}
}else{
//弹出提示
alert("你的Example题没有写完哦!!!")
//回到这个空题目出 这里该怎么写啊???
}