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

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

Why doesn\'

19条回答
  •  感情败类
    2020-11-22 12:07

    Above answers are great, but as jquery evolves.. so you can also do:

    var myId = $("#test").prop("id");
    

提交回复
热议问题