【发布时间】:2013-12-13 22:19:38
【问题描述】:
每当尝试在页面初始化时使用 FileReader 和 JSON 打开运行 javascript 代码的页面时,ie11 会报告“FileReader is not defined”,然后是“JSON is not defined”。 HTML文件的头部如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>LogViewer</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<link rel="stylesheet" href="css/slick.grid.css" type="text/css"/>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js" type="text/javascript"></script>
</head>
在 FF 和 Chrome 中一切正常。有什么想法吗?
【问题讨论】:
-
看起来您正在以兼容模式访问您的网站。从 IE10 开始支持 FileReader 和 JSON。检查您的 IE 兼容性设置。并遵循 Jan Schejbal 关于元标记的建议。
标签: javascript json filereader internet-explorer-11