Jquery 尽管收到结果,但总是从GooglePlaceAPI获取Jsonp回调错误

Jquery 尽管收到结果,但总是从GooglePlaceAPI获取Jsonp回调错误,jquery,jsonp,google-places-api,Jquery,Jsonp,Google Places Api,我试图在JSONP回调的帮助下从GooglePlaceAPI获取结果 到目前为止,我已经成功地得到了响应,但它在我的代码中返回了错误 下面是我调用GooglePlace API的代码 <html> <head> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script> function loadXMLDoc() { var jqxh

我试图在JSONP回调的帮助下从GooglePlaceAPI获取结果

到目前为止,我已经成功地得到了响应,但它在我的代码中返回了错误

下面是我调用GooglePlace API的代码

<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
function loadXMLDoc() {

    var jqxhr = $.ajax({
            type: "GET",
            dataType: "jsonp",
            crossDomain: true,
            jsonpCallback:false,
            url: 'https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Houston&sensor=true&types=(cities)&key=<Mykey>'
            })
            .done(function () {
           alert("success");
           })
          .fail(function (e) {
        alert("error"+e);
            })
   .always(function () {
alert("complete");
});

}
function localJsonpCallback(json) {
    if (!json.Error) {
       // $('#resultForm').submit();
        alert('fail');
    }
    else {
        alert('success');
    }
}
 </script>
</head>



<body>



<h2>AJAX</h2>
<button type="button" onclick="loadXMLDoc()">Request data</button>
<p>Click the button several times to see if the time changes, or if the file is cached.   </p>
<div id="myDiv"></div>

</body>
</html>
我在JSON数组中得到响应,但它总是返回失败回调

错误消息是:

语法错误:缺少;声明前

预测:[


请帮我解决这个问题。

您可能认为这是显而易见的,但也许您应该告诉我们错误消息是什么?错误消息是SyntaxError:missing;before语句预测:[