Sophia Wu
Sophia Wu

Reputation: 61

html href link to a new page under form tag

I'm creating a email template for validation email for user sign-up. Below is the html code:

<form>
    <input style="width: 300px; padding: 20px; cursor: pointer; font-weight: bold; background: #141452; color: #ffffff; border-radius: 10px;font-size: 150%;" type="button" 
           value="Verify my email address" onclick="window.location.href='https://www.google.com/'"/>
    </form>

I want to open the link in a new tab instead. Does anyone know how to incorporate "Target" in this code block?

Thanks!

Upvotes: 0

Views: 125

Answers (1)

nvioli
nvioli

Reputation: 4209

Try this instead:

window.open('http://www.google.com','_blank');

Upvotes: 2

Related Questions