是否有某个版本的 jQuery 可以让我在不托管文件的情况下热链接到?

发布于 2024-08-03 21:06:50 字数 146 浏览 2 评论 0原文

只是想知道是否有一个网站可以让您热链接到最新版本的 jquery。 Google 代码允许吗?还是 jQuery.com 本身允许?

寻找的是一个恰好有我可以捏的 jQuery 的网站。我想要一个网站,说你可以热链接到他们的 jQuery。

Just wondering if there's a website out there that allows you to hotlink to the latest version of jquery. Does Google code allow you, or does jQuery.com itself?

What I'm not looking for is a site that just happens to have jQuery that I can pinch. I want a site that says that you can hotlink to their jQuery.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

掩耳倾听 2024-08-10 21:06:50

是的,它可以在 Google 的 CDN 上使用。

您需要的一切都在这里:http://code.google.com/apis/libraries/

您可以直接链接到 JavaScript 文件: https:// ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js

或使用 google.load 方法


更新

它也可在 Microsoft 的 CDNjQuery CDN

Yes, it's available on Google's CDN.

Everything you need is here: http://code.google.com/apis/libraries/

You can link directly to the javascript file: https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js

or use the google.load method


Update

Its also available on Microsoft's CDN or the jQuery CDN

沙与沫 2024-08-10 21:06:50

您可以通过 2 种方法之一让 google 托管它。

方法 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>

方法 2 (更常见)

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

我知道 jquery.com 主机也是用户的文件,但他们可能已重定向到 jquery 托管以使用 google 版本。

You can have google host it in 1 of 2 methods.

Method 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>

Method 2 (more common)

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

I know jquery.com host's the file as well for users, they might have redirected there jquery hosting to use the google version though.

清君侧 2024-08-10 21:06:50

Microsoft 现在也托管 jQuery: http://www.asp.net/ajax/cdn /#4

Microsoft is now hosting jQuery as well: http://www.asp.net/ajax/cdn/#4

香橙ぽ 2024-08-10 21:06:50

除了 JQuery 之外,Google CDN 还托管 JQueryUI 和所有默认 Themeroller CSS UI 主题(包括图像!)。如果您计划从 JQuery 构建 UI,这非常关键。

http://encosia .com/2009/10/11/do-you-know-about-this-undocumented-google-cdn-feature/

In addition to JQuery, Google CDN also hosts JQueryUI and all the default Themeroller CSS UI themes (including images!). If you're planning to build a UI from JQuery this is pretty clutch.

http://encosia.com/2009/10/11/do-you-know-about-this-undocumented-google-cdn-feature/

筱武穆 2024-08-10 21:06:50

jQuery 现在允许您使用他们的网站,正如他们的下载页面所建议的

http://code.jquery.com/jquery-1.6.2.min.js

jQuery now allows you to use their site, as their download page suggests.

http://code.jquery.com/jquery-1.6.2.min.js

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文