我有一個JavaScript代碼,包含數組尾隨逗號ExtJS的問題與Internet Explorer 8
items:[{
id: 'col-1',
flex: 1 , //this comma is the source of the problem
},{
id: 'col-2',
flex: 1,
}
]
因此,這裏是我的問題,當我有這個逗號,它的工作原理上的Internet Explorer 8本地主機,但當我嘗試從服務器訪問它時,它不起作用,當我刪除它時,它工作正常。我在互聯網上搜索,答案是,IE不支持尾隨逗號,但在這種情況下,爲什麼它從本地主機而不是服務器上工作?
我使用的怪癖兼容模式,我不會在頭部X-UA-兼容有,這裏的頭
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="Description" content="Default Style" />
<meta name="Version" content="2.1.1" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>project name</title>
<link rel="stylesheet" type="text/css" href="./style/default/main.css" media="all" />
<style type="text/css" media="all">@import "./style/default/main.css";</style>
<link rel="shortcut icon" href="./style/default/images/favicon.ico" type="image/ico" />
<script type="text/javascript" src="http://10.215.63.218/Apsys/js/base.js"></script>
<script type="text/javascript" src="http://10.215.63.218/app/js/collapse.js"></script>
<script type="text/javascript" src="http://10.215.63.218/app/lib/overlib/overlib.js"></script>
</head>
當我在服務器上查看它時,我沒有使用Quirks模式或IE7兼容性 – Mansuro 2011-03-18 08:47:14