datatables 自定义按钮及响应点击事件
生活随笔
收集整理的這篇文章主要介紹了
datatables 自定义按钮及响应点击事件
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
按鈕
{"targets": -1,"class": "but_xq","data": null,"bSortable": false,"defaultContent": "<p><a id=\"edit\" href= "#\">修改</a > <a id=\"del\" href=\"#\">刪除</a ></p >"}點擊事件
/*** 修改*/ $('a#edit').on('click', 'a#edit', function () {var data = example_table.row($(this).parents('tr')).data();alert("查看修改:" + data + ","); });/*** 刪除*/ $('a#del').click(function () {var row = example_table.row($(this).parents('tr'));var data = row.data();row.remove().draw();alert("刪除:" + JSON.stringify(data)); });?
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎勵來咯,堅持創(chuàng)作打卡瓜分現(xiàn)金大獎總結(jié)
以上是生活随笔為你收集整理的datatables 自定义按钮及响应点击事件的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《概率论与数理统计》之常见概率分布
- 下一篇: application/x-www-fo