答案 0 :(得分:5)
我不认为有(虽然我没有完全的知识 - 我现在正在寻找这个解决方案)。
然而,我确实找到了this blog post,它可以从方便的Bootstrap组件创建一个。
<强> HTML 强>
<div class="modal hide" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false">
<div class="modal-header">
<h1>Processing...</h1>
</div>
<div class="modal-body">
<div class="progress progress-striped active">
<div class="bar" style="width: 100%;"></div>
</div>
</div>
</div>
<强>的JavaScript 强>
var myApp;
myApp = myApp || (function () {
var pleaseWaitDiv = $('<div class="modal hide" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false"><div class="modal-header"><h1>Processing...</h1></div><div class="modal-body"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div></div>');
return {
showPleaseWait: function() {
pleaseWaitDiv.modal();
},
hidePleaseWait: function () {
pleaseWaitDiv.modal('hide');
},
};
})();
示例用法:
myApp.showPleaseWait();
结果: