jsFiddle can't use externall resource like Goo

2019-08-03 09:12发布

I prepare some small code http://jsfiddle.net/VW9uR/ with External Resource to Google Place API, but the resource doesn't work.
The source is: http://maps.google.com/maps/api/js?sensor=false&libraries=places
How to add correct resource?

2条回答
我只想做你的唯一
2楼-- · 2019-08-03 09:31

you can add script tag in the html and make it on domready

<script src="http://maps.google.com/maps/api/js?sensor=false&libraries=places"></script>

find it working here

查看更多
劳资没心,怎么记你
3楼-- · 2019-08-03 09:39

jsfiddle needs a file-extension to determine which type of file should be loaded. Where no file-extension is available add the extension to the QUERY_STRING, e.g.:

 http://maps.google.com/maps/api/js?sensor=false&libraries=places&.js

Demo: http://jsfiddle.net/doktormolle/y939C/

Documentation: http://doc.jsfiddle.net/basic/introduction.html#external-resources

查看更多
登录 后发表回答