【发布时间】:2012-01-05 04:21:09
【问题描述】:
我在 jquery jqgrid 上做了一些测试,但有问题:
jQuery("#navgrid").jqGrid(
"navGrid",
"#pagernav",
{}, //options
{}, // edit options
{}, // add options
{
afterSubmit : function(response, postdata)
{
if(response.responseText == 'success')
{
console.log(postdata);
alert('success and data should be changed')
console.log(postdata.id);
jQuery("#navgrid").delRowData(postdata.id);
}
else
{
alert('failed and data should not be changed');
}
return true;
},
reloadAfterSubmit: true
}, // del options
{} // search options
);
我在firebug上做了两个console.log:
postdata => Object { oper="del", id="29"}
postdata.id => 29
然后我的萤火虫出现这样的错误:
postdata.split is not a function
toarr = postdata.split(",");
我想我已经遵循了这个方法: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods
【问题讨论】:
-
我在最新的 jqGrid 以及 jQuery 1.6.4 和 1.7.1 中看到了同样的情况。
标签: javascript