baidu_28448689 2015-05-24 07:35 采纳率: 0%
浏览 2029

为毛js本地执行IE没有问题,上传到服务器IE不执行?

在百度地图API抄了一个网页,在本地磁盘上使用IE能够打开地图;
上载到服务器在打不开,firefox、safari、chrome等都没有问题。据说是IE设置问题,到底是哪里呢?
html如下:

 <html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  

<title>JSAPI与URLAPI结合示例</title>  
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=b2GhWwO8fpGfZO7rKmvRTDzA"></script>  

<style type="text/css">  
html,body{  
    width:400px;  
    height:300px;
    margin:0;
    overflow:hidden;  
    }
</style>  
</head>  
<body>  
    <div style="width:400px;height:300px;border:1px solid gray" id="container"</div>  
</body>  
</html>  
<script type="text/javascript">  
    var map = new BMap.Map("container");  
    map.centerAndZoom(new BMap.Point(116.403884,39.914887), 13);  
    map.enableScrollWheelZoom();  
    var marker=new BMap.Marker(new BMap.Point(116.403884,39.914887));  
    map.addOverlay(marker);  



</script>
  • 写回答

3条回答 默认 最新

  • threenewbee 2015-05-24 08:23
    关注

    你的完整的html是怎样的,你用IE什么版本打开的。
    如果是IE 8.0,它不支持html5

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器