html
- <form>
- <input type="radio" name="category" value="doctor" /> Doctor
- <input type="radio" name="category" value="police" checked /> Policia
- </form>
js
- var category = null;
- $("input[name='category']").click(function() {
- category = this.value;
- alert(category);
- });
转载请注明:谷谷点程序 » jquery 获取单选框radio的值