Get href attribute on jQuery

后端 未结 6 1423
眼角桃花
眼角桃花 2021-02-12 13:24

I have some table rows


    
        
      
6条回答
  •  长发绾君心
    2021-02-12 14:02

    add a reference to this, which refers to your b_row:

    $("tr.b_row").each(function(){
        var a_href = $( this ).find('div.cpt h2 a').attr('href');
        alert ("Href is: "+a_href);
    });
    

提交回复
热议问题