我收到一个无效的表达式标志错误,我不知道这意味着什么。
jQueryAjaxCall(endpointUrl, methodToCall, dictQueryStringPairs, contentTypeOverride, returnDataType, function (httpResponse)
{
if (showalerts)
alert("Calling BindDroopdown from Models. model list recieved back based on modelTypeName: " + modelTypeName+ "and missid: " + missid+ ". Count results from ObjectCount(dictModels): " + ObjectCount(dictModels));
...rest of code
});
showAlerts是在我页面顶部定义的全局变量。我用它作为标志来打开和关闭我今天用警报做的一些测试。
注意ObjectCount只是我创建的一个帮助器:
function ObjectCount(object)
{
var count = 0;
if (object === null)
return 0;
for (key in object)
{
count = count + 1;
}
return count;
}
答案 0 :(得分:0)
用dictmodel.length替换ObjectCount(dictmodel)