$(document).on('事件','元素',function(参数){
// 函数体
})
元素获取方式:https://www.cnblogs.com/lixiuran/p/5316727.html
"id='id名称'"
"div[id^='开头名称']" 模糊匹配方式
勾选框状态获取: // 获取 checked 的状态
$(document).on('click', 'input\[name^="Fruit"\]', function (e) {
var clicktype= e.target.checked
console.log(clicktype)
console.log(e.target.name)
});
手机扫一扫
移动阅读更方便
你可能感兴趣的文章