
























这是一个创建于 3646 天前的主题,其中的信息可能已经有所发展或是发生改变。
<div id="exampleModal"> 。。。</div>
<button data-toggle="modal" data-target="#exampleModal"></button>
$('#exampleModal').on('show.bs.modal', function(event) {
$.ajax(...);
$(this).modal('hide');
});
第一次打开窗口会有一次 ajax ,不刷新,第二次打开窗口会有两次 ajax 。是因为$('#exampleModal')重复捆绑 modal 。怎样才能在不刷新前提下多次打开窗口但只绑定一个 modal 。
第 1 条附言 · 2016 年 6 月 21 日
已搞定
1 fising 2016 年 6 月 21 日 via iPhone每次都先 unbind ,应该有更好的办法 |
3 xx19941215 2017 年 3 月 12 日怎么弄的,我也遇到了类似的情况!!! |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。