使用集合让一切井井有条 根据您的偏好保存内容并对其进行分类。

Google 托管的库是一个稳定、可靠、高速、全球可用的内容分发网络,适用于最热门的开源 JavaScript 库。

Google 会针对每个库工作与主要利益相关方直接合作,并在最新版本推出时接受这些版本。

如需加载托管库,请复制该库的 HTML 代码段(如下所示)粘贴到您的网页中。例如,如需加载 jQuery,请将 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script> 代码段嵌入到网页中。

即使您自己的网站只使用 HTTP,我们也建议您通过 HTTPS 从 CDN 加载库。如今,性能很快,缓存的工作方式也同样如此。CDN 的文件通过 CORSTiming-Allow 标头提供,可以缓存 1 年。

CesiumJS

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/cesiumjs/1.78/Build/Cesium/Cesium.js"></script>
site:
github.com/CesiumGS/cesium
版本:
1.78

D3.js

代码段:
<script src="https://ajax.googleapis.com/ajax/libs/d3js/7.8.2/d3.min.js"></script>
site:
d3js.org
版本:

Dojo

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/dojo/1.13.0/dojo/dojo.js"></script>
site:
dojo Toolkit.org
版本:

Ext Core

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/ext-core/3.1.0/ext-core.js"></script>
site:
sencha.com/products/extcore
版本:
3.1.0、3.0.0

Hammer.JS

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/hammerjs/2.0.8/hammer.min.js"></script>
site:
hammerjs.github.io
版本:
2.0.8

Indefinite Observable

摘要:
<script type="module">
  import { IndefiniteObservable } from "https://ajax.googleapis.com/ajax/libs/indefinite-observable/2.0.1/indefinite-observable.bundle.js";
</script>
site:
https://github.com/material-motion/indefinite-observable-js
版本:
2.0.1、 1.0.1

jQuery

3.x 代码段:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
2.x 代码段:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
1.x 代码段:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
site:
jquery.com
版本:
注意:
3.3.0、2.1.2、1.2.5 和 1.2.4 并非托管内容,因为它们在野外生活的时间较短且不稳定。

jQuery Mobile

摘要:
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js"></script>
site:
jquerymobile.com
版本:
1.4.5、1.4.4、1.4.3、1.4.2、1.4.1、1.4.0
注意:
此库依赖于 jQuery。您还必须先加载 jQuery,然后再加载此模块。

jQuery UI

摘要:
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/jquery-ui.min.js"></script>
site:
jqueryui.com
版本:
155
注意:
此库依赖于 jQuery。您还必须先加载 jQuery,然后再加载此模块。由于版本 1.8.3 的生命周期很短,因此它未托管,而别名 1.8.3 实际上会加载 1.8.4。

Material Motion

摘要:
<script type="module">
  import {
    Draggable,
    Point2DSpring,
    Tossable,
    combineStyleStreams,
    getPointerEventStreamsFromElement,
  } from "https://ajax.googleapis.com/ajax/libs/material-motion/0.1.0/material-motion.bundle.js";
</script>
site:
https://github.com/material-motion/material-motion-js
版本:
0.1.0

Model-Viewer

代码段:
<script src="https://ajax.googleapis.com/ajax/libs/model-viewer/3.0.0/model-viewer.min.js"></script>
site:
modelviewer.dev
版本:

MooTools

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.6.0/mootools.min.js"></script>
site:
mootools.net
版本:
1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 2.
注意:
对于版本 1.5.1 及更早版本,精简版的文件名称为 mootools-yui-compressed.js,而不是 mintools.min.js。

Myanmar Tools

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/myanmar-tools/1.2.1/zawgyi_detector.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/myanmar-tools/1.2.1/zawgyi_converter.min.js"></script>
site:
https://github.com/google/myanmar-tools/
推荐版本:
1.2.1
所有托管版本:
1.0.1
1.1.0
1.1.1
1.1.3
1.2.0
1.2.1

Prototype

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.3.0/prototype.js"></script>
site:
prototypejs.org
版本:
1.7.3.0、1.7.2.0、1.7.1.0、1.7.0.0、1.6.1.0、1.6.0.3、1.6.0.2

script.aculo.us

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js"></script>
site:
script.aculo.us
版本:
1.9.0、1.8.3、1.8.2、1.8.1
注意:
此库依赖于 Prototype。在加载此模块之前,您必须先加载原型。

Shaka Player

代码段:
<!-- for non-UI builds: -->
<script src="https://ajax.googleapis.com/ajax/libs/shaka-player/4.3.4/shaka-player.compiled.js"></script>

<!-- or, for UI builds: -->
<script src="https://ajax.googleapis.com/ajax/libs/shaka-player/4.3.4/shaka-player.ui.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/shaka-player/4.3.4/controls.css">
site:
https://github.com/google/shaka-player/
维护的版本:
4.3.4、4.2.8、4.1.7、3.3.17、3.2.19
所有托管版本:

SPF

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/spf/2.4.0/spf.js"></script>
site:
youtube.github.io/spfjs
版本:
2.4.0、2.3.2、2.3.1、2.3.0、2.2.0、2.1.2、2.1.1、2.1.0、2.0.1、2.0.0

SWFObject

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
site:
github.com/swfobject/swfobject
版本:
2.2、2.1

three.js

摘要:
<script src="https://ajax.googleapis.com/ajax/libs/threejs/r84/three.min.js"></script>
site:
threejs.org
版本:
r84、r83、r82、r81、r80、r79、r78、r77、r76、r75、r74、r73、r72、r71、r70、r69、r68、r67 r49

Web Font Loader

代码段
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
site:
github.com/typekit/webfontloader
版本:
1.6.26、1.6.16、1.5.18、1.5.10、1.5.6、1.5.3、1.5.2、1.5.0

问题排查

看到过时的版本?确保您没有使用“自动版本”链接(如 /jqueryui/1/...),而是使用了引用确切版本的网址。鉴于缓存方面的顾虑,甚至即使是次要版本之间的兼容性问题,我们也在一段时间前弃用并停止了自动更新版本别名,因此它们将永远引用旧版本(以免破坏仍在使用它们的现有网站)。

如果您遇到了问题,请执行以下操作: