源代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>无标题页</title>
       <style type="text/css">
    .hidden { display:none;} 
  </style>
</head>
<body onload="ca()">
    <form id="aa" runat="server" >
    <div id="gridview" visible="false">
    <asp:GridView ID="GridView1" runat="server" Width="0px" CssClass="hidden"> 
    </asp:GridView>     
    </div>   
    <div id="map" style="width:800px; height:650px"></div>
    </form>
</body>
    <script src="google map 密匙" type="text/javascript"></script>
    <script type="text/javascript" src="CreateMarkers.js"></script>
</html>这个页面是调用google地图的,单独测试的时候能够显示出地图以及标记的坐标,但是当我把地图模块嵌入项目时,浏览器提示:出现了运行时间错误,缺少对象。
GridView是用来接收数据库的信息,在CreateMarkers.js中读取到经纬度然后返回给页面在地图上做出标记。
<body>中的 onload="ca()" ca()是CreateMarkers.js中的function。
主要问题出在CreateMarkers.js中,提示缺少对象,即google map中的例如GMarker,GMap2对象无法加载。
不知道问题出在哪里,在线等待指点。