【问题标题】:html href link to a new page under form taghtml href 链接到表单标签下的新页面
【发布时间】:2017-09-14 16:49:06
【问题描述】:

我正在为用户注册的验证电子邮件创建电子邮件模板。下面是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>

我想在新标签页中打开链接。有谁知道如何在这个代码块中加入“目标”?

谢谢!

【问题讨论】:

标签: html forms hyperlink target


【解决方案1】:

试试这个:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-19
    • 2021-12-02
    • 1970-01-01
    • 2017-08-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多