On my form I havea set of radio buttons. Here\'s the mark up:
Format 相关标签:
Format
Try:
var checkbox = $("input[@name='fileType']:checked"); if( checkbox.length > 0 ) { alert( checkbox.val() ); // checkbox value } else { alert('Please select a format'); // error }
http://jsfiddle.net/wE4RD/