jquery - How to get the value of an entity in a class? -


i have html like

 <div class="test" id="12345"></div> 

using jquery, how can value of id class name?

try :

var id = $('div.test').attr('id'); 

Comments