Using jQuery to open all external links in a new window

后端 未结 1 1899
孤城傲影
孤城傲影 2021-01-13 05:26

New to jQuery here. I\'ve found several web pages that come close to what I\'m trying to do, but not quite. Actually, I think the following is supposed to actuall

1条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-13 05:46

    No need for the @ symbol. Other than that, you're golden.

    $("a[href^='http://']")...
    

    0 讨论(0)
提交回复
热议问题