开发者

Does anyone know if you can get an API Key for javascript at Google WITHOUT a current URL?

开发者 https://www.devze.com 2023-01-02 20:27 出处:网络
I\'m developing a webapp/website on my local machine and won\'t know the url I\'m using for it, but I\'d like to use G开发者_JAVA技巧oogle\'s hosted javascript APIs. Anyone know how I\'d go about doin

I'm developing a webapp/website on my local machine and won't know the url I'm using for it, but I'd like to use G开发者_JAVA技巧oogle's hosted javascript APIs. Anyone know how I'd go about doing this?


You can get jQuery from Google's CDN via http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js For any other information in this regard you may want to refer to http://code.google.com/apis/ajaxlibs/documentation/#AjaxLibraries . And just have a look at the library Paths. You do not need any API key for this.


You can even get a API key for a local machine. Let's say you use http://localhost or http://your-machine-name you can get a API key for this URL. I have done that to be able to check my JavaScript within my local XAMPP dev system.

But opening the file through file:// might fail in this case.

EDIT: If you just want to use the Google hosted AJAX APIs like jQuery or Prototype and you don't want to load them with google.load(), you don't need a key. Just use the absolute links you can find on this page: http://code.google.com/apis/ajaxlibs/documentation/index.html#jquery


You don't need a key to use the Google AJAX Javascript Libraries API itself. Only some of the libraries requires a key to load.

You can still use their JSAPI to load 3rd party libraries such as jQuery, dojo, prototype and so on.

Could you please specify which libraries you are using?

0

精彩评论

暂无评论...
验证码 换一张
取 消