获取单选框的值有三种方式: 1、$('input:radio:checked').val(); 2、$("input[type='radio']:checked").val(); 3、$("input[name='rd']:checked").val();
原址:https://cloud.tencent.com/developer/article/1556315#:~:text=%E8%8E%B7%E5%8F%96%E5%8D%95%E9%80%89%E6%A1%86%E7%9A%84%E5%80%BC%E6%9C%89%E4%B8%89%E7%A7%8D%E6%96%B9%E5%BC%8F%EF%BC%9A%201%E3%80%81%24%28%27input%3Aradio%3Achecked%27%29.val%28%29%20%EF%BC%9B%202%E3%80%81%24%28%22input,%5Btype%3D%27radio%27%5D%3Achecked%22%29.val%28%29%3B%203%E3%80%81%24%28%22input%20%5Bname%3D%27rd%27%5D%3Achecked%22%29.val%28%29%3B%20%E6%9C%AC%E6%96%87%E4%B8%BA%E4%BB%99%E5%A3%AB%E5%8F%AF%E5%8E%9F%E5%88%9B%E6%96%87%E7%AB%A0%2C%E8%BD%AC%E8%BD%BD%E6%97%A0%E9%9C%80%E5%92%8C%E6%88%91%E8%81%94%E7%B3%BB%2C%E4%BD%86%E8%AF%B7%E6%B3%A8%E6%98%8E%E6%9D%A5%E8%87%AA%E4%BB%99%E5%A3%AB%E5%8F%AF%E5%8D%9A%E5%AE%A2www.php20.cn