BootstrapTable加載按鈕功能實(shí)例代碼詳解
1 html
<!--工具欄-->
<div id="toolbar" class="btn-group">
<div style="float:left;margin-right: 10px">
<button class="btn btn-danger"onclick="openModal('add',0,'')">增加</button>
</div>
</div>
<!--工具欄-->
<div id="toolbar" class="btn-group">
<div style="float:left;margin-right: 10px">
<button class="btn btn-danger" onclick="openModal('add',0,'')">增加</button>
</div>
</div>
2 bootStarp

3 js打開(kāi)彈窗

//打開(kāi)新增或者是更新模態(tài)框
function openModal(type,id,value){
globalType=type;
globalId=id;
if(type=='add'){
// $('#money').val('');
$('#hotelServiceName').val('');
$('#loginPassword').text("登錄密碼");
$('#operateHotelServiceModal').modal('show');
}
// else if(type=='update'){
// $('#operateHotelServiceType').text("更新酒店設(shè)施(若不更新圖片則無(wú)需選擇圖片,保持圖片為空)");
// //設(shè)置設(shè)施ID
// $('#money').val(id);
// //設(shè)置設(shè)施名稱
// $('#hotelServiceName').val(value);
// //設(shè)置圖片
// $('#operateHotelServiceModal').modal('show');
// }
}
4 彈窗

<div id="operateHotelServiceModal"class="modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="blue bigger" id="operateHotelServiceType"></h4>
</div>
<form id="hotelServiceForm">
<div class="modal-body overflow-visible">
<div class="row">
<div class="col-xs-12">
<div class="form-group">
<label class="col-sm-3 control-labelno-padding-right" for="bankName"> 選擇銀行:</label>
<div class="col-sm-9">
<select class="form-control" id="bankName">
<option value="中國(guó)工商銀行">中國(guó)工商銀行</option>
<option value="中國(guó)銀行">中國(guó)銀行</option>
<option value="中國(guó)農(nóng)業(yè)銀行">中國(guó)農(nóng)業(yè)銀行</option>
<option value="中國(guó)郵政銀行">中國(guó)郵政銀行</option>
<option value="中國(guó)建設(shè)銀行">中國(guó)建設(shè)銀行</option>
</select>
</div>
</div>
<div style="height:25px"></div>
<div class="form-group">
<label class="col-sm-3control-label no-padding-right" for="realName"> 真實(shí)姓名: </label>
<div class="col-sm-9">
<input type="text" class="col-xs-10col-sm-12" id="realName" placeholder="請(qǐng)輸入真實(shí)姓名" />
</div>
</div>
<div style="height:25px"></div>
<div class="form-group">
<label class="col-sm-3 control-labelno-padding-right" for="bankIdcard"> 身份證號(hào): </label>
<div class="col-sm-9">
<input type="text" class="col-xs-10col-sm-12" id="bankIdcard" />
</div>
</div>
<div style="height:25px"></div>
<div class="form-group">
<label class="col-sm-3 control-labelno-padding-right" for="bankNumber"> 銀行卡號(hào): </label>
<div class="col-sm-9">
<input type="text" class="col-xs-10col-sm-12" id="bankNumber" />
</div>
</div>
<div style="height:25px"></div>
<div class="form-group">
<label class="col-sm-3 control-labelno-padding-right" for="bankNameZhi"> 開(kāi)發(fā)支行: </label>
<div class="col-sm-9">
<input type="text" class="col-xs-10col-sm-12" id="bankNameZhi" />
</div>
</div>
<div style="height:25px"></div>
<div class="form-group">
<label class="col-sm-3 control-labelno-padding-right" for="bankPhone"> 銀行卡預(yù)留電話: </label>
<div class="col-sm-9">
<input type="text" class="col-xs-10col-sm-12" id="bankPhone" />
</div>
</div>
</div>
</div>
</div>
</form>
<div class="modal-footer">
<button class="btn btn-sm" data-dismiss="modal">
<i class="icon-remove"></i>
取消
</button>
<button class="btn btn-sm btn-primary" onclick="saveBank()">
<i class="icon-ok"></i>
提交審核
</button>
</div>
</div>
</div>
</div><!-- PAGE CONTENT ENDS -->
總結(jié)
以上所述是小編給大家介紹的BootstrapTable加載按鈕功能實(shí)例代碼詳解,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
ElementUI table無(wú)縫循環(huán)滾動(dòng)的示例代碼
這篇文章主要介紹了ElementUI table無(wú)縫循環(huán)滾動(dòng)的示例代碼,代碼簡(jiǎn)單易懂,對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2022-08-08
優(yōu)化innerHTML操作(提高代碼執(zhí)行效率)
多數(shù)現(xiàn)代瀏覽器都實(shí)現(xiàn)了innerHTML操作,它的方便性讓我們愛(ài)不釋手,但如果使用不當(dāng),很容易出現(xiàn)效率問(wèn)題,本文通過(guò)一個(gè)例子來(lái)說(shuō)明如何優(yōu)化innerHTML操作。2011-08-08
js實(shí)現(xiàn)簡(jiǎn)單的抽獎(jiǎng)系統(tǒng)
這篇文章主要為大家詳細(xì)介紹了js實(shí)現(xiàn)簡(jiǎn)單的抽獎(jiǎng)系統(tǒng),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-03-03
Bootstrap面板(Panels)的簡(jiǎn)單實(shí)現(xiàn)代碼
這篇文章主要為大家詳細(xì)介紹了Bootstrap面板(Panels)的簡(jiǎn)單實(shí)現(xiàn)代碼,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-03-03
js判斷iframe中元素是否存在的實(shí)現(xiàn)代碼
這篇文章主要介紹了js判斷iframe中元素是否存在的實(shí)現(xiàn)代碼,需要的朋友可以參考下2016-12-12
基于JavaScript偽隨機(jī)正態(tài)分布代碼實(shí)例
這篇文章主要介紹了基于JavaScript偽隨機(jī)正態(tài)分布代碼實(shí)例,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2019-11-11

