を支援します。
HTMLバージョン(一部のデバイスがそれをサポートしていません):
<a href="http://chriscoyier.net" target="_blank">This link will open in new window/tab</a>
のためのJavaScriptのバージョンすべてのデバイス:
のrel = "外部" の使用は完全に有効な
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$('a[rel="external"]').attr('target', '_blank');
</script>
とjQueryが1以下で試すことができるためである。
$("#content a[href^='http://']").attr("target","_blank");
ブラウザの設定があなたを許可しない場合新しいウィンドウで開く:
href = "google.com";
onclick="window.open (this.href, ''); return false";
が重複する可能性を(のhttp:/ /stackoverflow.com/questions/6296013/how-can-i-open-a-link-in-new-tab-and-not-new-window) – Wex
を使用してください '...' –
[新しいタブでリンクを開く] ](http://stackoverflow.com/questions/15551779/open-link-in-new-tab) – Sufian