$(document).on('submit', 'form', function() { var url = this.action; $.post(url, $('form').serialize(), function(data) { if (data.success == true) { $('#registerpanel').dialog('close'); refreshLoginPartial(); } else { $('#registerpanel').html(data); } }); return false; }); function refreshLoginPartial() { $("#registerpanel").dialog({ close: function() { // } }); }
关闭事件想刷新
<section id="login">
@Html.Partial("_LoginPartial")
</section>
这部分的内容。该怎样写?
$.post('@Url.Action(Action, Controller)', { }, function (result) { $("#login").html(result); });