我在搞乱 HTML5 的 IndexedDB。
下面是来自http://html5-demos.appspot.com/static/html5storage/index.html#slide31的一个简单代码 ,它在 Chrome 或 Firefox 中对我不起作用,它在 Firebug 中给了我这个消息:
未捕获的类型错误:无法调用未定义的方法“打开”
对于代码的第一行,即:
var db = window.indexedDB.open('FriendDB', 'My Friends!'); // exception here
有人可以帮我完成这项工作吗?
我知道这适用于浏览器,因为此交互式幻灯片有效:http ://html5-demos.appspot.com/static/html5storage/index.html#slide34