[Solved] Get img alt which parent a’s href is something [closed]

[ad_1]

// will match http://localhost only:
$('a[href="http://localhost"]').find('img').attr('alt'); 

// will match links hreffing to URLs starting with http://localhost 
$('a[href^="http://localhost"]').find('img').attr('alt');

6

[ad_2]

solved Get img alt which parent a’s href is something [closed]