onclick 事件,获取当前块id

   $('#stage_intro_list').on('click','.stage_intro', function (e) {
            console.log(e);
            console.log(this)
            var id = $(this).attr('id');

            console.log(id);
        })
    <div from-data="stage_intro" id="stage_intro_list">

 <h3 class="stage_intro" id="{{temp_id}}"><a><label class="h_lable" style="min-width:14%;">阶段{{sort_no}}</label><label class="h_lable">{{stage_name}}</label></a></h3>
</div>

 

 点击当前元素,获取当前元素的属性id

posted @ 2020-08-19 17:22  八英里  阅读(2205)  评论(0编辑  收藏  举报