js求助Uncaught TypeError: Cannot read property '1' of undefined
operate:function(oper,row_id){if(oper=='add'&&!row_id){vartitle=__('添加分类');vardata={o...
operate: function (oper, row_id)
{
if (oper == 'add'&&!row_id)
{var title = __('添加分类'); var data = { oper: oper,callback:this.callback};
var met = 'manage';} else if(oper == 'add'&&row_id) {
var title = __('添加分类');
var data = {oper: oper,parent_id: row_id,callback: this.callback};
var met = 'manage';}else{var title = sprintf('编辑分类', $("#grid").data('gridData')[row_id]['cat_name']);
var data = {oper: oper,rowId: row_id, rowData: $("#grid").data('gridData')[row_id],
callback: this.callback};
var met = 'manage';}
报错的是var title = sprintf('编辑分类', $("#grid").data('gridData')[row_id]['cat_name']);这一句后半部分,JS看不太懂,菜鸟新手,请大神指点 展开
{
if (oper == 'add'&&!row_id)
{var title = __('添加分类'); var data = { oper: oper,callback:this.callback};
var met = 'manage';} else if(oper == 'add'&&row_id) {
var title = __('添加分类');
var data = {oper: oper,parent_id: row_id,callback: this.callback};
var met = 'manage';}else{var title = sprintf('编辑分类', $("#grid").data('gridData')[row_id]['cat_name']);
var data = {oper: oper,rowId: row_id, rowData: $("#grid").data('gridData')[row_id],
callback: this.callback};
var met = 'manage';}
报错的是var title = sprintf('编辑分类', $("#grid").data('gridData')[row_id]['cat_name']);这一句后半部分,JS看不太懂,菜鸟新手,请大神指点 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询