html jquery操作

$(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)
       });
原文地址:https://www.cnblogs.com/yc-c/p/13229806.html