IE8 给我一个错误,'document' is null or not an object。
User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.3)
Timestamp: Fri, 3 May 2013 10:54:06 UTC
Message: 'document' is null or not an object
Line: 111
Char: 5
Code: 0
URI: http://foo/f2/Teste.html
除 IE 外,所有浏览器都可以使用。
<body>
<div id="map" style="width: 400px; height: 650px;"></div>
<script type="text/javascript">
var ActiveXObject;
var Parsed = [[]];
var txtFile;
和,
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 7,
center: new google.maps.LatLng(39.50, -8.37),
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
我唯一记得的是 .getElemntByID('') 的问题,但它已正确分配给地图。
似乎是什么问题?
完整代码在这里:源代码