分享一个radio再次点击取消选中的js方法

function clearRadio(obj) {
	if ($(obj).attr("checked") == "checked") {
		$(obj).removeAttr("checked");
	} else {
		$(obj).attr("checked", "checked");
	}
	$("[name=" + obj.name + "]:not(#" + obj.id + ")").removeAttr("checked");
}

猜你喜欢

转载自blog.csdn.net/qq_31685413/article/details/82817381