input单选组(radio),点击事件

  $("input[type='radio']").on("click",function(){
			   console.log($(this).val());
		   })

name一致保持单选效果:

<label style="width:120px;">
	<input name="link" type="radio" value="0"/>
		服务类别
</label> 
<label style="width:120px;">
	<input name="link" type="radio" value="1" checked="checked"/>
		外部链接</label> 

猜你喜欢

转载自blog.csdn.net/tt18473481961/article/details/81030777