Heim >Web-Frontend >js-Tutorial >datagrid框架的删除添加与修改_jquery

datagrid框架的删除添加与修改_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:38:101349Durchsuche

复制代码 代码如下:























用户姓名:
创建开始时间
创建结束时间
查找 清空











扩展editor方法:datetimebox

复制代码 代码如下:

$(function () {
/*扩展Editors的datetimebox方法*/
$.extend($.fn.datagrid.defaults.editors, {
datetimebox: {//为方法取名
init: function (container, options) {
var editor = $('').appendTo(container);
options.editable = false;//设置其不能手动输入
editor.datetimebox(options);
return editor;
},
getValue: function (target) {//取值
return $(target).datetimebox('getValue');
},
setValue: function (target, value) {//设置值
$(target).datetimebox('setValue', value);
},
resize: function (target, width) {
$(target).datetimebox('resize', width);
},
destroy: function (target) {
$(target).datetimebox('destroy');//销毁生成的panel
}
}
});
});

图示:

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn