表单Web浏览器脚本错误 [英] form web browser script error

查看:65
本文介绍了表单Web浏览器脚本错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我的网页包含以下代码:



Hello
I have a web page contains this code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<script type="text/javascript"
      src="http://maps.google.com/maps/api/js?key=AIzaSyDAtuVJT2weVT8ilkKfDcMwmPXe7B1HMj0"></script>

<script type="text/javascript">
    var map;


    function load() {

        var mapOptions = { center: { lat: 31.293514, lng: 36.191711 }, zoom: 7, mapTypeId: google.maps.MapTypeId.HYBRID };
        map = new google.maps.Map(document.getElementById('map'), mapOptions);
        geocoder = new google.maps.Geocoder();
    }

    function showAddress() {
        var address = document.getElementById("addressTEXT").value;
        geocoder.geocode({ 'address': address }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); map.setZoom(14); } else { alert("Geocode was not successful for the following reason: " + status); } });
    }
</script>
<link rel="stylesheet" type="text/css" href="http://code.google.com/css/dev_docs.css"/>
</head>
<body >
                   

      <input type="text" size="60" id="addressTEXT" value="31.293514, 36.191711" />
  <input type="button" value="Set Address" />
  <div id="map" style="width: 600px; margin-removed 20px; height: 600px"></div>

</body>
</html>





它在网络浏览器上的工作正常,但在表格网页浏览器上我收到一条错误消息在链接中看到它

https://www.dropbox.com/s/hy17td9ebsavuiz/script%20error.png?dl=0



这里是网页文件

https://www.dropbox.com/s/t1itemwcx7p4720/GetMap.html?dl=0 [ ^ ]





如何解决这个问题?



its work fine on web browser, but on form web browser i get an error message "see it in the link"
https://www.dropbox.com/s/hy17td9ebsavuiz/script%20error.png?dl=0

here is the web page file
https://www.dropbox.com/s/t1itemwcx7p4720/GetMap.html?dl=0[^]


how to solve this problem?

推荐答案

缺少对谷歌地图脚本文件的引用。请添加脚本源路径。
reference to google maps script file is missing. Please add the script source path.


这篇关于表单Web浏览器脚本错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆