我有一组名称为'periodType'的单选按钮。该组中有一个单选按钮的行为与其他行为相同,除了它显示额外的div。我怎样才能在特定的单选按钮被选中知道,如下的改变功能是该组中的所有单选按钮是通用:获取Jquery中单选按钮组的ID
$('input[name="periodType"]').change(function() {
if(this.checked) {
//do something (for all radio buttons)
//If unique radio button also do this
}
});
<input type="radio" name="periodType" default>
<input type="radio" name="periodType" default>
<input type="radio" name="periodType" default>
<input type="radio" name="periodType" default>
我看不到任何的div在HTML中的额外的div显示 –