Twitter bootstrap 你如何告诉A<;按钮>;使用引导导航到哪里?

Twitter bootstrap 你如何告诉A<;按钮>;使用引导导航到哪里?,twitter-bootstrap,Twitter Bootstrap,我有一个正常的不安全网页,上面有一个。我的问题是,这个按钮应该引导用户进入网站主页,但我不知道如何告诉它 此页面保存在站点CMS系统中,因此没有代码: <h1>Recover Password Complete</h1> <p>A temporary password has been sent to your registered email account. Once you login you will be required to change you

我有一个正常的不安全网页,上面有一个
。我的问题是,这个按钮应该引导用户进入网站主页,但我不知道如何告诉它

此页面保存在站点CMS系统中,因此没有代码:

<h1>Recover Password Complete</h1>
<p>A temporary password has been sent to your registered email account. Once you login you will be required to change your password.</p>
<div>&nbsp;</div>
<p><button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-home">&nbsp;</span>Return to the homepage</button></p>
恢复密码完成
已向您注册的电子邮件帐户发送临时密码。登录后,您需要更改密码

返回主页

该网站目前正在升级为使用bootstrap、MVC等,之前的
是一个正常的
,我正试图避免

是否有办法告诉按钮单击时导航到哪里,否则我将不得不返回到


谢谢

在按钮上使用onclick属性,如so

<button onclick="window.location.href='<your_url>'"></button>

您也可以将btn类应用于锚点,这可能比使用javascript进行导航要好

<h1>Recover Password Complete</h1>
<p>A temporary password has been sent to your registered email account. Once you login you will be required to change your password.</p>
<div>&nbsp;</div>
<p><a class="btn btn-default" href="homepage.htm"><span class="glyphicon glyphicon-home">&nbsp;</span>Return to the homepage</a></p>
恢复密码完成
已向您注册的电子邮件帐户发送临时密码。登录后,您需要更改密码


谢谢。效果很好。这是更合适的解决方案。