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

 

posted @ 2020-07-03 12:59  睡到自然醒ccc  阅读(124)  评论(0编辑  收藏  举报