Eri*_*ric 12 jquery google-code hotlinking
只是想知道是否有一个网站,允许您热链接到最新版本的jquery.谷歌代码是否允许您,或jQuery.com本身?
我不想要的是一个恰好有jQuery我可以捏的网站.我想要一个网站,说你可以链接到他们的jQuery.
Geo*_*ord 31
是的,它可以在谷歌的CDN上找到.
您需要的一切都在这里:http://code.google.com/apis/libraries/
您可以直接链接到javascript文件:https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
或使用该google.load方法
更新
它也可以在微软的CDN或jQuery CDN上获得
Jas*_*vis 10
你可以让google以2种方法之一托管它.
方法1
<script type="text/javascript"
src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
// You may specify partial version numbers, such as "1" or "1.3",
// with the same result. Doing so will automatically load the
// latest version matching that partial revision pattern
// (i.e. both 1 and 1.3 would load 1.3.2 today).
google.load("jquery", "1.3.2");
google.setOnLoadCallback(function() {
// Place init code here instead of $(document).ready()
});
</script>
Run Code Online (Sandbox Code Playgroud)
方法2(更常见)
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
Run Code Online (Sandbox Code Playgroud)
我知道jquery.com主机的文件以及用户,他们可能已经重定向到jquery主机以使用谷歌版本.