前台:
<input type="radio" value="2" id="tg" name="state"/> <a style="cursor:pointer;" onclick="selected(0)">通过</a>
<input type="radio" value="3" id="th" name="state"/> <a style="cursor:pointer;" onclick="selected(1)"> 退回</a>
JS:
function selected(a)
{
$("input[name='state']").get(a).checked=true;
}
$(window).ready(function () {
$("#tg").on("click", function () {
$("#result").css("display","none");
})
$("#th").on("click", function () {
$("#result").css("display", "block");
})
$("#ButSuc").on("click", function () {
var che = $('input:radio[name="state"]:checked').val();
if (che == undefined || che == null) {
alert("请选择状态"); return false;
}
})
})