如何使用注销按钮上的提交类型字体真棒



我需要发一篇帖子注销,所以我需要一个"输入类型"。

我如何更改此输入,以便使用FontAwasone类

我已经尝试过使用button标记,但它在"a"标记中不起作用。

<div class="sidebar-footer">             
<a href="#">
<i class="fa fa-envelope"></i>
<span class="badge badge-pill badge-success notification">7</span>
</a>
<a>
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { role = "form" }))
{
@Html.AntiForgeryToken()
<input type="submit" value="Logout" class="btn btn-primary" />
}    
</a>
//Need to use that Awesome  Class                   
<a href="#">
<i class="fa fa-power-off"></i>
</a>
</div>

在这种情况下,使用按钮元素应该可以工作,并允许您在其中放入所需的任何HTML。

<button type="submit" class="btn btn-primary">
<i class="fa fa-power-off"></i>
</button>

最新更新