jQuery 取选中的radio的值方法

var val=$(‘input:radio[name=“sex”]:checked’).val();

附三种方法都可以:


$('input:radio:checked').val();
   
$("input[type='radio']:checked").val();

$("input[name='rd']:checked").val();

本文来自 zisgood 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/zisgood/article/details/80901965?utm_source=copy