脚本异步延迟未定义的属性名称

问题描述 投票:1回答:1

我在Eclipse Oxygen中有一个xhtml文件

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

并且我尝试使用

<script async="defer"
src="https://maps.googleapis.com/maps/api/js?key=...&amp;callback=initMap" type="">
</script>

但是我收到“未定义属性名称(异步)”通知。我该怎么做才能克服这个问题?

eclipse asynchronous xhtml deferred
1个回答
0
投票

尝试一下:

<script async="true" defer
src="https://maps.googleapis.com/maps/api/js?key=...&amp;callback=initMap" type="">
</script>
© www.soinside.com 2019 - 2024. All rights reserved.