当前位置: 移动技术网 > IT编程>开发语言>JavaScript > jtable列中自定义button示例代码

jtable列中自定义button示例代码

2019年03月19日  | 移动技术网IT编程  | 我要评论

代码如下:


information: {
title: 'info',
width: '5%',
sorting: false,
edit: true,
create: true,
type:'textarea',
display: function (customerdata) {
var $img = $('<img src="content/images/document_properties.png" title="view and edit information" />');
$img.click(function () {
$('#customerstablecontainer').jtable('openchildtable',
$img.closest('tr'),
{
title: customerdata.record.name + ' - information',
actions: {
listaction: 'ajax/customer_info_actions.php?action=list&searchterm=' + customerdata.record.customernumber,
},
fields: {
customernumber: {
title: 'number',
key: true,
create: false,
edit: false,
list: false
},
information: {
title:'information',
create: false,
edit: true,
list: true,
type:'textarea'
},

}
}, function (data) { //opened handler
data.childtable.jtable('load');
});
});
return $img;
}
},
'''''

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网