我现在对于百里香非常新,我试图加入
第5行
但我收到错误
我试过这个
<div xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="layout" layout:fragment="content">
<head>
<title>Google Address Loopup Test</title>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script>
<script type='text/javascript' src='../js/jquery-latest.js'></script>
<script type='text/javascript' src='jquery-latest.js'></script>
<script type="text/javascript">
$(function() {
var input = document.getElementById('searchTextField');
var autocomplete = new google.maps.places.Autocomplete(input);
google.maps.event.addListener(autocomplete, 'place_changed', function() {
var place = autocomplete.getPlace();
/*$('#selected').text("Place selected:" +place.formatted_address)*/
});
});
</script>
</head>
<body>
<div>
<input id="searchTextField" type="text" size="50"/>
</div>
<!--<div id="selected">No address selected</div>-->
</body>
</div>
HTTP状态500 - 请求处理失败;嵌套异常是org.thymeleaf.exceptions.TemplateInputException:异常解析文档:template =“test”,第5行 - 第103列
,第五行是我上面粘贴的脚本代码。 任何人都可以帮助我 提前致谢
答案 0 :(得分:1)
你必须逃脱& , < , > and "
个字符。试试这个地址:
http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false