gpt4 book ai didi

twitter-bootstrap - 如何在 Bootstrap Table 中添加 Bootstrap 按钮

转载 作者:行者123 更新时间:2023-12-04 01:23:40 28 4
gpt4 key购买 nike

如何在 Bootstrap Table 中添加 Bootstrap 按钮

最佳答案

我已经想出了解决办法。我想和大家分享。

这是我的 table :

 <table
id="table"
data-toggle="table"
data-pagination="true"
data-url="data/RegisteredVisitors.json"
data-show-refresh="true"
data-show-toggle="true"
data-show-columns="true"
data-search="true"
data-show-pagination-switch="true"
data-id-field="visitor_id"
data-page-list="[10, 25, 50, 100, ALL]"
data-show-footer="false">
<thead>
<tr>
<th data-field="visitor_id" data-checkbox="false" >#</th>
<th data-field="visitor_number" data-formatter="VisitorDetails">Visitor #</th>
<th data-field="visitor_names" data-formatter="VisitorDetails" data-sortable="true">Visitor Names</th>
<th data-field="phone_number" data-sortable="true">Phone Number</th>
<th data-field="matter_type" data-sortable="true">Matter Type</th>
<th data-field="office_name" data-sortable="true">Office Attending</th>
<th data-field="time_in" data-sortable="true">Time In</th>
<th data-field="time_out" data-sortable="true">Time Out</th>
<th data-field="last_visit" data-sortable="true">Last Visit</th>
<th data-formatter="TableActions">Action</th>
</tr>
</thead>
</table>

这是我的 jQuery 函数
function TableActions (value, row, index) {
return [
'<a class="like" href="javascript:void(0)" title="Edit">',
'<i class="glyphicon glyphicon-pencil"></i>',
'</a> ',
'<a class="danger remove" href="javascript:void(0)" data-visitorserial="'+row.visitor_id+'" data-visitornames="'+row.visitor_names+'" data-visitorid="'+row.visitor_number+'" data-toggle="modal" data-target="#VisitorDelete" title="Remove">',
'<i class="glyphicon glyphicon-trash"></i>',
'</a>'
].join('');
}

终于让它运行起来了。

关于twitter-bootstrap - 如何在 Bootstrap Table 中添加 Bootstrap 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39791568/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com