Html 在 IE 上查看本地存储内容
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9539877/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Viewing local storage contents on IE
提问by govin
How can I view the contents of HTML5 local storage in IE? Chrome and FireFox provide a way through their developer tools to view the contents of local storage but I couldn't find that information using IE9 developer tool.
如何在 IE 中查看 HTML5 本地存储的内容?Chrome 和 FireFox 提供了一种通过其开发人员工具查看本地存储内容的方法,但我无法使用 IE9 开发人员工具找到该信息。
回答by Alex
Since localStorage is a global object, you can add a watch in the dev tools. Just enter the dev tools, goto "watch", click on "Click to add..." and type in "localStorage".
由于 localStorage 是一个全局对象,您可以在开发工具中添加一个监视。只需进入开发工具,转到“watch”,单击“Click to add...”并输入“localStorage”。
回答by LainZero
In IE11, you can see local storage in console on dev tools:
在 IE11 中,您可以在开发工具的控制台中看到本地存储:
- Show dev tools (press F12)
- Click "Console" or press Ctrl+2
- Type
localStorage
and press Enter
- 显示开发工具(按F12)
- 单击“控制台”或按Ctrl+2
- 输入
localStorage
并按下Enter
Also, if you need to clear the localStorage, type localStorage.clear()
on console.
此外,如果您需要清除 localStorage,请localStorage.clear()
在控制台上键入。