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-14%;">阶段{{sort_no}}</label><label class="h_lable">{{stage_name}}</label></a></h3>
</div>

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

原文地址:https://www.cnblogs.com/deepalley/p/13530560.html