var Role = $('input:radio[name="radio"]:checked').val(); if (Role == null) { alert("什么也没选中!"); return false; }