html href链接到表单标记下的新页面

时间:2017-04-18 17:54:26

标签: html forms hyperlink target

我正在为用户注册创建验证电子邮件的电子邮件模板。以下是html代码:

<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>

我想在新标签中打开链接。有谁知道如何合并&#34; Target&#34;在这个代码块?

谢谢!

1 个答案:

答案 0 :(得分:2)

请改为尝试:

window.open('http://www.google.com','_blank');
相关问题