bootstrap中如何多次使用一个摸态框?
/**弹出框设置**/ function showjcziimodal(url, width) { $("#jczii-modal").remove();//如果存在此Id的Modal先remove var modal = $('<div >\ <div class="modal-dialog" role="document" + width + '">\ <div class="modal-content">\ </div>\ </div>\ </div>').modal(); $('body').append(modal); modal.find('.modal-content') .load(url, function (responseText, textStatus) { if (textStatus === 'success' || textStatus === 'notmodified') { modal.show(); } }); } //页面所有Modal弹出 $(function () { $('*[rel="jczii-modal"]').on('click', function (e) { var modal_width = !!$(this).attr('data-width') ? $(this).attr('data-width') : ''; showjcziimodal($(this).attr('data-href'), modal_width); e.preventDefault(); }); })