我有一个功能,看起来完全是这样的:Javascript名称冲突?
function exportSelectedToExcel(id)
{
var selectedRows = new Array();
//Retrieve selected items from the grid
selectedRows = grid.getGridParam('selarrrow');
//Always add the item in id, it doesn't matter if it's there twice.
selectedRows[selectedRows.length] = id;
//Build the url
var params = selectedRows.join("&id=");
var exportUrl = "/Export/SelectListExporters?id=" + params;
//Show the selection form
SelectionWindow.show(exportUrl, "#selectionForm", 400);
}
每次我运行此功能的阵列增长与至少一个项目(一个我添加到它的结束)。这肯定意味着我在系统中的其他地方有另一个同名的数组,对吧?
有没有什么办法可以在google chrome或firefox中找到变量的位置?
编辑:在整个项目中没有这样的变量,从视觉工作室验证。
编辑2:这是我打电话:http://www.secondpersonplural.ca/jqgriddocs/_2eb0fb79d.htm
编辑3:我已经改变了代码,开始与以下内容:
var retrievedRows = grid.getGridParam('selarrrow');
var selectedRows = retrievedRows.slice(0);
现在它就像预期。
你说什么是有道理的,但我怎么能影响电网的回报价值? –
...通过编辑它的源代码 – Quentin