簡體   English   中英

ie11中未定義FileReader和JSON對象

[英]FileReader and JSON objects not defined in ie11

每當在頁面初始化時嘗試使用FileReader和JSON打開運行javascript代碼的頁面時,ie11報告“未定義FileReader”,以及稍后“未定義JSON”。 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中一切正常。 有任何想法嗎?

添加<meta http-equiv="X-UA-Compatible" content="IE=edge" />作為標題的第一個標記,以確保。 IE喜歡進入兼容模式,即使在某些情況下存在HTML5文檔類型(特別是在計算機位於域中時的Intranet文件中)。

您可以使用開發人員工具(F12)來檢查您正在運行的模式。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM