首頁  >  文章  >  web前端  >  如何從 Google API 取得最新版本的 jQuery 函式庫?

如何從 Google API 取得最新版本的 jQuery 函式庫?

Linda Hamilton
Linda Hamilton原創
2024-10-21 22:49:02236瀏覽

How Can I Get the Most Up-to-Date Version of the jQuery Library from Google APIs?

如何從Google API 取得最新版本的jQuery 函式庫

腳本標籤中使用的原始jQuery 連結格式:

目前,Google API 上沒有最新版本jQuery 函式庫的直接連結。但是,在jQuery 1.11.1 之前,以下URL 提供對最新版本的訪問:
  • https://code.jquery.com/jquery-latest.min.js(jQuery 託管,縮小)
  • https://code.jquery.com/jquery-latest.js(jQuery 託管,未壓縮)
  • https://ajax.googleapis.com/ajax/libs/jquery/ 1 /jquery.min.js(Google 託管,縮小)
  • https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js(Google 託管,未壓縮)

例如:

但請注意,從jQuery 1.11.1 開始,這些URL 已被凍結在1.11.1 版本,不會進一步更新。做出此決定是出於穩定性原因,如本部落格文章所述:不要使用 jquery-latest.js。

jQuery 和 Google 都支援 HTTP 和 HTTPS 協議,因此您可以相應地調整 URL。此外,您可以參閱 Google 開發者指南,以了解有關使用 Google 託管庫的更多資訊。

以上是如何從 Google API 取得最新版本的 jQuery 函式庫?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn