歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> BootStrap Table 的onClickCell回調函數兩種寫法參數不一致

BootStrap Table 的onClickCell回調函數兩種寫法參數不一致

日期:2017/3/1 9:18:43   编辑:Linux編程

BootStrap Table的官方手冊上說,onClickCell和click-cell.bs.table是一樣的,但是經過測試,這兩種寫法的結果不一致,如果用onClickCell的方式,參數是那四個,但是一旦轉換為click-cell.bs.table的方式,參數就會變成了五個,並且第一個是整個table的對象。【Linux公社 www.linuxidc.com】

所以在用這個函數的時候,要寫成:bootstraptable('click-cell.bs.table',function( e, field, value, row, $element){}) 的形式才可以。

onClickCell click-cell.bs.table field, value, row, $element Fires when user click a cell, the parameters contain:
field: the field name corresponding to the clicked cell,
value: the data value corresponding to the clicked cell,
row: the record corresponding to the clicked row,
$element: the td element.

來自美國政府的Web設計標准,不建議使用Bootstrap http://www.linuxidc.com/Linux/2015-10/124172.htm

Bootstrap 的詳細介紹:請點這裡
Bootstrap 的下載地址:請點這裡

Copyright © Linux教程網 All Rights Reserved