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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM