json= new Gson().toJson(name);
其中name是字符串类型。TypeError:无效'in'操作数目标
我得到错误说:
错误是在Java脚本的给定部分
return type === "array" || type !== "function" &&
(length === 0 ||
typeof length === "number" && length > 0 && (length - 1) in obj);
我也曾尝试
response=JSON.parse(response);
“类型错误 '在' 操作数OBJ无效”这不起作用。
是什么'responseJson' –
是什么'obj'? – Grundy
我从servlet获取的响应对象 – user2814799