jquery 下载
jQuery 官方下载方式
访问 jQuery 官方下载页面(https://jquery.com/download/),提供以下版本选择:
- Production(生产环境):压缩版(minified),文件较小,适合线上部署。
- Development(开发环境):未压缩版,便于调试和阅读源码。
支持直接下载 jQuery 3.x(最新稳定版)或 jQuery 1.x(兼容旧浏览器)。
通过 CDN 引入
无需下载,直接通过 CDN 链接引入 jQuery:
<!-- jQuery 3.x (最新稳定版) -->
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<!-- jQuery 1.x (兼容旧版IE) -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
npm 或 yarn 安装
适用于 Node.js 或前端构建工具(如 Webpack、Vite):
# 使用 npm
npm install jquery
# 使用 yarn
yarn add jquery
GitHub 仓库获取
从 jQuery 的 GitHub 仓库(https://github.com/jquery/jquery)克隆或下载源码:
git clone https://github.com/jquery/jquery.git






