摘要:
$.extend 特别适合于有默认值的情况。在以下例子中,operation的name是必需的,其他项如未设置则使用默认值。不使用$.extend的写法如下:// this为用户设置的operation对象,如{name:"edit",title:"编辑2"}if (!this.title) { if (this.name=="edit") { this.title="编辑"; } else if ...} else if (!this.icon) { ...}这种写法不仅费事,易读性也不强,难以维护。使用$.ex 阅读全文
摘要:
1、解析option(1)合成column($(target).datagrid("getColumnOption",field);)$(_4be).children("thead").each(function(){var opt=$.parser.parseOptions(this,[{frozen:"boolean"}]);$(this).find("tr").each(function(){var cols=[];$(this).find("th").each(function(){va 阅读全文