jquery获取button的内容(id等)

 

$(document).ready(function(){
                $('button').click(function(){
                    //alert($(this).attr("id"));
                    //alert($(this).html())
                var content = $(this).attr("id");
                
            // var content = $('.addpet').val();
            console.log(content);

posted on 2019-12-10 10:56  网瘾秋千  阅读(1985)  评论(0编辑  收藏  举报

导航