问题
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?
回答1:
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
回答2:
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
来源:https://stackoverflow.com/questions/17564221/jsfiddle-cant-use-externall-resource-like-google-place-api