(随手记)jquery获取radio的值
html代码:
<input type="radio" id="callSuccess" name="isSuccessCalled" value="1" />呼叫成功
<input type="radio" id="callFail" name="isSuccessCalled" value="2" />呼叫失败
jquery代码:
var radioVal = $('input:radio[name="isSuccessCalled"]:checked').val();
if(radioVal == null){
alert("请选择结果!");
}