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