How can I get the ID of an element using jQuery?

后端 未结 19 2877
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 11:57

Why doesn\'

19条回答
  •  无人共我
    2020-11-22 12:07

    $('#test').attr('id') In your example:

    $(document).ready(function() { alert($('#test').attr('id')); });

提交回复
热议问题