add target="_blank" to all link with a certain a div.

Posted by kakkalo on Stack Overflow See other posts from Stack Overflow or by kakkalo
Published on 2009-04-29T21:02:16Z Indexed on 2010/03/16 20:21 UTC
Read the original article Hit count: 346

Filed under:
|

so lets say i got these following codes

<div id="link_other"> <ul> <li><a href="http://www.google.com/">google</a></li> <li><div class="some_class">dsalkfnm sladkfm <a href="http://www.yahoo.com/">yahoo</a></div> </li> </ul> </div>

so in this case script will add target="_blank" to all links within "link_other" div. how can i do that? thank you

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about hyperlinks