0
我想在我的IE11中使用indexedDB,但它似乎是未定義的。這是代碼:如何讓indexedDB在IE11中工作?
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<script>
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction;
window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange
if (IDBTransaction) {
window.IDBTransaction.READ_WRITE = window.IDBTransaction.READ_WRITE || 'readwrite';
window.IDBTransaction.READ_ONLY = window.IDBTransaction.READ_ONLY || 'readonly';
}
if (!window.indexedDB) {
window.alert("Your browser doesn't support a stable version of IndexedDB.")
}
alert(document.documentMode);
alert(document.compatMode);
</script>
</head>
<body>
The content of the document......
</body>
</html>
它提醒:
Your browser doesn't support a stable version of IndexedDB.
11
CSS1Compat
有誰知道什麼是錯?
感謝