jQuery 操作 radio
<input type="radio" value="remove" name="execution">
<input type="radio" value="add" name="execution">
獲取radio的值
var execute = $('input:radio[name="execution"]:checked').val();
if(execute == null) {
console.log("radio don't selected");
return false;
}else{
console.log(execute);
}
如果radio沒有選中,val()返回為“null”。