js 动态绑定事件

jQuery(document.body).on('change', '.singlechx', function () {
var cbxname = $(this).attr("name");
if ($(this).prop("checked") == true) {
$("input[name='" + cbxname + "']").prop("checked", false);
$(this).prop("checked", true);
}
})
posted on 2017-12-20 14:33  lippor  阅读(396)  评论(0编辑  收藏  举报