Uncaught (in promise) SyntaxError: Unexpected token * in JSON at position 0--問題解決

背景: 在敲前端項目時,使用到了sessionStorage,由於裏面存儲的包含中文漢字。所以在提取使出現了問題。   問題: 我在提取sessionStorage中的值時,使用的語句如下 JSON.parse(sessionStorage.getItem('key')) 出於習慣,我將提取到的sessionStorage裏的value值又進行了JSON.parse轉換。 後來進行了解,大家經常這
相關文章
相關標籤/搜索