我使用此代码从dropdownmenu注销但无法正常工作
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
这是我的表格
<form asp-area="" asp-controller="Account" asp-action="Logout" method="post" id="logoutForm" class="navbar-right">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@UserManager.GetUserName(User)! <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Gigs I'm Going</a></li>
<li><a href="#">Artist I'm Following</a></li>
<li role="separator" class="divider"></li>
<li>
<a href="javscript:document.getElementById('logoutForm').submit()">Log out</a>
</li>
</ul>
</li>
</ul>
</form>