$(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)
       });

 

相关文章:

  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2022-02-19
  • 2021-10-18
  • 2021-08-27
  • 2022-12-23
  • 2021-10-28
猜你喜欢
  • 2021-07-15
  • 2022-12-23
  • 2021-04-28
  • 2021-12-27
  • 2021-11-17
  • 2022-12-23
相关资源
相似解决方案