HTML question in regards to buttons via /r/learnprogramming


HTML question in regards to buttons

Hey all, I am having trouble making this button open the link in a new window, does anyone see anything glaringly obvious that I am doing wrong? I have tried several different ways to write the code, but each time it opens in the same tab of the browser. Thank you!

<button onClick="location.href='https://www.youtube.com/watch? v=S2N_uvnvGbI', '_blank'">Today could be better =(</button> 

Submitted July 17, 2017 at 01:09PM by c19890611
via reddit http://ift.tt/2uBnkfl

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s