我想在我的数据表函数中传递1个参数:addfctCallback
var buttons = [];
buttons.push({
text: '<span class="glyphicon glyphicon-plus"></span> new',
className: 'product-add btn btn-success btn-xs',
titleAttr: 'add a product',
action: addfctCallback // how to pass the parameter here?
}
我想在函数addfctCallback中获取'param':
function addfctCallback(e, param) {
console.log('param : ' + param);
}
谢谢
答案 0 :(得分:1)
从docs
复制面食action: function ( e, dt, node, config ) {
alert( 'Activated!' );
this.disable(); // disable button
}