<form action="" method="post" onSubmit="return confirm();" >
</form>
<script>
function confirm(){
//开启首末场设置后,首场和末场数量都为0,阻止表单提交
var value=$("input[name='is_setting']:checked").val();
if(value==1){
var first_num=$("input[name='first_num']").val();
var last_num=$("input[name='last_num']").val();
if(first_num==0 && last_num==0){
alert("开启首末场设置后,首场和末场数量至少有一项需填写大于0的整数");
return false;
}
}
}
</script>