62,266
社区成员
发帖
与我相关
我的任务
分享$(document).on('submit', 'form', function() {
var url = this.action; // $('form').attr('action');
$.post(url, $('form').serialize(), function(data) {
if (data.success == true) {
$('#registerpanel').dialog('close');
refreshLoginPartial();
} else {
$('#registerpanel').html(data);
}
});
return false;
});
function refreshLoginPartial() {
//刷新<section id="login">这块
} <body>
<header>
<div class="content-wrapper">
<div class="float-left">
<p class="site-title">@Html.ActionLink("将你的徽标放置在此处", "Index", "Home")</p>
</div>
<div class="float-right">
<section id="login">
@Html.Partial("_LoginPartial")
</section>
<nav>
<ul id="menu">
<li>@Html.ActionLink("主页", "Index", "Home")</li>
<li>@Html.ActionLink("关于", "About", "Home")</li>
<li>@Html.ActionLink("联系方式", "Contact", "Home")</li>
</ul>
</nav>
</div>
</div>
</header>
<div id="body">
@RenderSection("featured", required: false)
<section class="content-wrapper main-content clear-fix">
@RenderBody()
</section>
</div>
<footer>
<div class="content-wrapper">
<div class="float-left">
<p>© @DateTime.Now.Year - 我的 ASP.NET MVC 应用程序</p>
</div>
</div>
</footer>
<div id="registerpanel"></div>
@RenderSection("scripts", required: false)
</body>