有人可以帮我找出为什么IE9不会加载我的谷歌地图,但其余的主要浏览器会。我认为它与实际的设置或标题有关,而不是javascript,但让我知道你是否也想要。下面是代码:为什么只有Internet Explorer不会加载我的谷歌地图对象
<?php
include('session.php');
?>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps API Project</title>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api /js?sensor=false"></script>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<h1>Title</h1>
<div id="map" style="width: 1000px; height: 500px"></div>
<div id="message"></div>
<input type="text" id="search" >
<input type="button" onclick="search();" value="Search">
<input type="button" onclick="addlaunchMark();" value="Add Launch">
<input type="checkbox" id="launches" checked="checked" onchange="addRemovelaunch()">
</br>
<input type="textbox" id="box1" style="display: none">
<input type="textbox" id="box2" style="display: none">
<script type="text/javascript">
</script>
</body>
嗯..顺便说一句,你缺少上述 doctype声明? <!DOCTYPE html>也结束标记缺少..因为您的粘贴或其他东西的错误? –
由于某种原因,我不认为你可以在PHP代码后声明。我做到了,它的工作原理非常感谢! – HondaKillrsx
太棒了,我把它作为答案发布,以便您接受。 :) –