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