在新窗口中打开外部链接

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在新窗口中打开外部链接相关的知识,希望对你有一定的参考价值。

This jQuery code should make all external links from the #content div open in a new window.
  1. $("#content a[href^='http://']").attr('target','_blank');

以上是关于在新窗口中打开外部链接的主要内容,如果未能解决你的问题,请参考以下文章

JavaScript 在新窗口中打开外部链接

在新窗口中打开外部链接

在新窗口中打开外部链接

在新窗口中打开外部链接

JavaScript jQuery在新窗口中打开外部链接

自动在新窗口中打开每个外部链接(html、css)