How do I make a div link open in a new tab Javascript onClick="[removed]

前端 未结 2 707
北海茫月
北海茫月 2021-01-04 08:14

I created a range of social media buttons which when the mouse hovers it switches to a different image (giving it a highlight effect). The images work as I want them to, how

相关标签:
2条回答
  • 2021-01-04 08:53

    onclick="window.open('http://google.pl', '_blank');"

    0 讨论(0)
  • 2021-01-04 09:09

    <div id="facebook" style="cursor:pointer;" onClick="window.open('http://www.google.com','_newtab');">Test</div>

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