我在 IE 10 上使用 msSaveBlob 和 msSaveOrOpenBlob 方法时遇到问题。这些方法似乎适用于 IE 11 和 IE 10 版本 10.0.9200.17183,但 API 在 IE 10 版本 10.0.9200.16844 上失败。
我正在此站点http://msdn.microsoft.com/en-us/library/ie/hh779016%28v=vs.85%29.aspx#blobbuilder上尝试示例 1 代码
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Example 1</title>
</head>
<body>
<h1>Example 1</h1>
<script>
var blobObject = new Blob(["I scream. You scream. We all scream for ice cream."]);
window.navigator.msSaveBlob(blobObject, 'msSaveBlob_testFile.txt'); // The user only has the option of clicking the Save button.
alert('File save request made using msSaveBlob() - note the single "Save" button below.');
var fileData = ["Before you insult a person, walk a mile in their shoes. That way, when you insult them, you'll be a mile away - and have their shoes."];
blobObject = new Blob(fileData);
window.navigator.msSaveOrOpenBlob(blobObject, 'msSaveBlobOrOpenBlob_testFile.txt'); // Now the user will have the option of clicking the Save button and the Open button.
alert('File save request made using msSaveOrOpenBlob() - note the two "Open" and "Save" buttons below.');
</script>
</body>
</html>
下面是 IE 10 两个版本的行为截图
是否有其他方法可以在方法失败的 IE 10 版本上导出 blob?