Javascript examples for jQuery:Link
Force links in a specific div open in new tab
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.3.min.js"></script> <script type="text/javascript"> $(function(){//from ww w. j a v a2s .c o m $("a").attr("target","_blank"); }); </script> </head> <body> <a href="http://java2s.com/">java2s</a> <br> <a href="http://java2s.com/">java2s</a> <br> <a href="http://java2s.com/">java2s</a> </body> </html>