javascript validation query
$("#submit_js").click(function() {
$.post(
"user_submit.php",
{score: $('#ques'+qn).find('input[name=vote]:checked').val(), uid:$("#uid").val() },
function(data){
i didnt post the complete fun开发者_StackOverflow社区ction. but that is out of scope. i need to ask how can i validate that the user has chosen a radio button? can someone help me with the syntax?
$('input:radio:checked').length > 0
精彩评论