📅  最后修改于: 2022-03-11 15:03:05.838000             🧑  作者: Mango
localStorage.getItem(key)
try {
data = JSON.parse(key)
}
catch (e) {
// if the code errors, this bit of code will run
}
finally {
return data
}