BootStrap Table 獲取同行不同列元素的方法
表格同行中存在元素的相互調(diào)用,如何保證元素能夠被同行不同列的其他方框使用,方法如下:
頁(yè)面元素示例如下:
<div id="MyTableId" class="content-main-container"> <div class="panel panel-primary gd-panel" id="mywindow"> <div class="panel-heading"> <b>TableNameElemnt</b> </div> <div class="panel-body"> <table class="table table-bordered" id="csMemberPackageTable" style="word-break: keep-all;"> </table> </div> </div> </div>
頁(yè)面 JS 代碼示例如下:
$(function () {
$('#MyTableId').bootstrapTable('destroy');
$("#MyTableId").bootstrapTable({
url:'/*** /*** Action_*** List.action',
dataType: "json",
showRefresh: true,
striped: true,
cache: true,
undefinedText: "-",
sortName: "id",
sortOrder: "asc",
pagination: true,
sidePagination: "server",
toolbar: "#toolbar",
pageNumber:1,
pageSize:3,
smartDisplay:true,
pageList:[5,10,25,50],
paginationPreText: "上一頁(yè)",
paginationNextText: "下一頁(yè)",
columns: [{
checkbox: true
},
{
field:'pId',
title:'操作',
align:'center',
formatter:function(value,row,index){
var aId = row.aId;
var bId = row.bId;
var cId = row.cId;
var a =
'<a href="/**** /**** Action_**** GoJsp.action?ResObj.' +
'pId='+pId+'&ResObj.aId='+aId +
'&ResObj.bId='+bId+
'&ResObj.cId='+cId+
'"'+'class="cs_menuTab"> 編輯全部 Id </a>';
return a;
}
},{
field: "aId",
title: "A 標(biāo)簽",
align: "center"
},
{
field: "bId",
title: "B 標(biāo)簽",
align: "center"
},
{
field: 'cId',
title: 'C 標(biāo)簽',
align: 'center'
}]
});
});
以上所述是小編給大家介紹的BootStrap Table 獲取同行不同列元素的方法,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
- jQuery獲取this當(dāng)前對(duì)象子元素對(duì)象的方法
- js通過(guò)classname來(lái)獲取元素的方法
- javascript中獲取元素標(biāo)簽中間的內(nèi)容的實(shí)現(xiàn)方法
- JS獲取html元素的標(biāo)記名實(shí)現(xiàn)方法
- js獲取元素的標(biāo)簽名實(shí)現(xiàn)方法
- jQuery實(shí)現(xiàn)獲取元素索引值index的方法
- jQuery元素屬性操作實(shí)例(設(shè)置、獲取及刪除元素屬性)
- js 獲取元素所有兄弟節(jié)點(diǎn)的實(shí)現(xiàn)方法
- 原生js獲取元素樣式的簡(jiǎn)單方法
- 如何獲取元素的最終background-color
相關(guān)文章
詳解JavaScript中怎么實(shí)現(xiàn)鏈表
鏈表是一系列節(jié)點(diǎn)串聯(lián)形成的數(shù)據(jù)結(jié)構(gòu),鏈表存儲(chǔ)有序的元素集合,鏈表中的元素在內(nèi)存中并不是連續(xù)放置的,本文給大家介紹了在JavaScript中怎么實(shí)現(xiàn)鏈表,需要的朋友可以參考下2023-12-12
微信小程序分享海報(bào)生成的實(shí)現(xiàn)方法
為了吸引更多的用戶,設(shè)計(jì)好一個(gè)分享海報(bào)還是很有必要的,這篇文章主要介紹了微信小程序分享海報(bào)生成的實(shí)現(xiàn)方法,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2018-12-12
Bootstrap3使用typeahead插件實(shí)現(xiàn)自動(dòng)補(bǔ)全功能
這篇文章主要介紹了Bootstrap3使用typeahead插件實(shí)現(xiàn)自動(dòng)補(bǔ)全功能的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-07-07
js入門之Function函數(shù)的使用方法【新手必看】
本篇文章主要介紹js Function函數(shù)的使用方法,應(yīng)該對(duì)初學(xué)Js的朋友們會(huì)有所幫助,下面就隨小編一起來(lái)看下吧2016-11-11
nodejs創(chuàng)建web服務(wù)器之hello world程序
本文給大家分享nodejs創(chuàng)建web服務(wù)器之hello world程序,node真的很好用,不僅用v8引擎來(lái)解析了javascript外,還提供了高度優(yōu)化的應(yīng)用庫(kù),真的很好,有需要的朋友一起來(lái)學(xué)習(xí)吧2015-08-08

