您好,我有一个带模态引导程序的页面。当我隐藏模态时,我发现页面调用者的所有字段都被清除了。
我已经调试了代码,我看到发生了什么并且在jquery框架上
这是我模态的代码
<div class="modal fade draggable-modal" id="modalContatto" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" id="btnModalClose" aria-hidden="true"></button>
<h4 class="modal-title">Ricerca Contatto</h4>
</div>
<div class="modal-body">
@{ ContattoModelView cmv = new ContattoModelView();
cmv.ModeView = ContattoModelView.MODEVIEW.SEARCH;
} @Html.Partial("~/Views/Shared/Search/ContattoSearch.cshtml", cmv)
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
<script type="text/javascript">
$(document).ready(function () {
$("#btnModalClose").on('click', function () {
$('#modalContatto').modal('hide');
});
});
</script>
</div>
有人可以帮助我吗?