jquery1.12.4下载
时间: 2023-08-08 16:02:29 浏览: 60
### 回答1:
jquery 是一款流行的 JavaScript 库,它极大的简化了前端开发的流程。jquery1.12.4 是 jquery 最后一个支持 Internet Explorer 6/7/8 浏览器的版本。由于 Internet Explorer 对于 JavaScript 的支持度远不如其他现代浏览器,因此如果您需要兼容老旧的浏览器,那么 jquery1.12.4 是非常适合您的选择。
jquery1.12.4 提供了很多功能,比如 DOM 操作、事件处理、Ajax 网络请求和动画特效等等。通过使用 jquery1.12.4,您可以非常方便的在浏览器端实现各种效果。
如果您想下载 jquery1.12.4,可以在 jquery 官网 http://jquery.com/ 上找到下载链接。jquery1.12.4 的下载包括两个版本,一个是压缩版 minified,一个是未压缩版 not-minified。未压缩版适合调试代码,可以看到更详细的错误信息,但是体积较大,加载速度较慢。压缩版则可以让您的页面加载速度更快。
总之,如果您需要兼容老旧的浏览器,我们强烈推荐您下载 jquery1.12.4。它不仅提供了丰富的功能,而且可以让您的开发变得更加简单和快速。
### 回答2:
要下载 jQuery 1.12.4 版本,你可以按照以下步骤进行操作:
1. 打开任意一个浏览器(如谷歌浏览器、火狐浏览器等)。
2. 在浏览器的地址栏中输入 "https://jquery.com/download/" 并按下回车键,打开 jQuery 官方网站的下载页面。
3. 在页面中找到一个标有 "Download the compressed, production jQuery 1.12.4" 的按钮,点击它。
4. 此时会弹出一个小窗口,选择 "Save File" 选项并点击 "OK",开始下载 jQuery 1.12.4 版本。
5. 下载完成后,打开下载文件所在的文件夹,你会找到一个名为 "jquery-1.12.4.min.js" 的文件,这就是 jQuery 1.12.4 版本的文件。
如果你是使用 npm 进行项目管理,你也可以通过运行以下命令来下载 jQuery 1.12.4 版本:
```
npm install jquery@1.12.4
```
这个命令将会从 npm 的仓库中下载并安装 jQuery 1.12.4 版本,你可以在你的项目中使用它。
无论你选择哪种方式,下载完成后,你就可以在你的项目中引入这个 jQuery 文件,并开始使用其中的功能了。
### 回答3:
对于jquery1.12.4的下载,可以通过以下几种方式进行:
1. 官方网站:可以直接访问jquery的官方网站(https://jquery.com/),在网站首页的"Download"页面中可以找到各个版本的jquery文件。在该页面中,选择"1.x versions"选项卡,然后在该选项卡中可以找到并下载jquery1.12.4的文件。
2. CDN:可以通过使用CDN(内容分发网络)来下载jquery1.12.4文件。CDN是一种全球范围的服务器网络,可以提供可靠的文件分发服务。在HTML文件中,可以通过在<head>标签中插入以下代码来加载jquery1.12.4:
```html
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
```
该代码会从CDN中加载并引入jquery1.12.4文件。
3. Github:jquery的开源代码可在Github上获取。可以通过访问jquery的Github页面(https://github.com/jquery/jquery/releases),在该页面找到release版本,然后下载jquery1.12.4的源代码或压缩文件。
总结起来,要下载jquery1.12.4,可以从其官方网站、CDN或Github上获取。官方网站提供了特定版本的下载选项,CDN则提供了快速加载的引用代码,而Github则提供了源代码和已压缩的文件供下载。
相关推荐










1. 分页展示Hdfs文件列表
前端代码:
html
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
#
文件名
大小
修改时间
操作
<c:forEach items="${hdfsFiles}" var="hdfsFile" varStatus="status">
${status.index+1}
${hdfsFile.name}
${hdfsFile.size}
${hdfsFile.modificationTime}
<button class="btn btn-danger" onclick="deleteFile('${hdfsFile.path}')">删除</button>
<button class="btn btn-success" onclick="downloadFile('${hdfsFile.path}')">下载</button>
</c:forEach>
<c:choose>
<c:when test="${pageInfo.pageNum == 1}">
首页
上一页
</c:when>
<c:otherwise>
首页
上一页
</c:otherwise>
</c:choose>
<c:forEach begin="${pageInfo.navigateFirstPage}" end="${pageInfo.navigateLastPage}" var="i">
<c:choose>
<c:when test="${i == pageInfo.pageNum}">
${i}
</c:when>
<c:otherwise>
${i}
</c:otherwise>
</c:choose>
</c:forEach>
<c:choose>
<c:when test="${pageInfo.pageNum == pageInfo.pages}">
下一页
尾页
</c:when>
<c:otherwise>
下一页
尾页
</c:otherwise>
</c:choose>
后端代码:
java
@RequestMapping("/listFiles")
public ModelAndView listFiles(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize) throws Exception {
ModelAndView mv = new ModelAndView("fileList");
FileSystem fs = FileSystem.get(new URI("hdfs://localhost:9000"), new Configuration(), "root");
RemoteIterator<LocatedFileStatus> fileStatusListIterator = fs.listFiles(new Path("/"), true);
List<HdfsFile> hdfsFiles = new ArrayList<>();
while (fileStatusListIterator.hasNext()) {
LocatedFileStatus fileStatus = fileStatusListIterator.next();
HdfsFile hdfsFile = new HdfsFile();
hdfsFile.setName(fileStatus.getPath().getName());
hdfsFile.setPath(fileStatus.getPath().toString());
hdfsFile.setSize(fileStatus.getLen());
hdfsFile.setModificationTime(fileStatus.getModificationTime());
hdfsFiles.add(hdfsFile);
}
PageHelper.startPage(pageNum, pageSize);
PageInfo<HdfsFile> pageInfo = new PageInfo<>(hdfsFiles);
mv.addObject("hdfsFiles", pageInfo.getList());
mv.addObject("pageInfo", pageInfo);
return mv;
}
2. 上传文件
前端代码:
html
<form action="${pageContext.request.contextPath}/uploadFile" method="post" enctype="multipart/form-data">
<label>选择文件</label>
<input type="file" name="file">
<button type="submit" class="btn btn-primary">上传</button>
</form>
后端代码:
java
@RequestMapping("/uploadFile")
public String uploadFile(@RequestParam("file") MultipartFile file) throws IOException, URISyntaxException {
FileSystem fs = FileSystem.get(new URI("hdfs://localhost:9000"), new Configuration(), "root");
Path dst = new Path("/" + file.getOriginalFilename());
FSDataOutputStream outputStream = fs.create(dst);
IOUtils.copyBytes(file.getInputStream(), outputStream, 4096, true);
return "redirect:/listFiles";
}
3. 删除文件
前端代码:
html
<button class="btn btn-danger" onclick="deleteFile('${hdfsFile.path}')">删除</button>
后端代码:
java
@RequestMapping("/deleteFile")
public String deleteFile(String path) throws IOException, URISyntaxException {
FileSystem fs = FileSystem.get(new URI("hdfs://localhost:9000"), new Configuration(), "root");
Path dst = new Path(path);
fs.delete(dst, true);
return "redirect:/listFiles";
}
4. 下载文件
前端代码:
html
<button class="btn btn-success" onclick="downloadFile('${hdfsFile.path}')">下载</button>
后端代码:
java
@RequestMapping("/downloadFile")
public ResponseEntity<byte[]> downloadFile(String path) throws IOException, URISyntaxException {
FileSystem fs = FileSystem.get(new URI("hdfs://localhost:9000"), new Configuration(), "root");
Path dst = new Path(path);
FSDataInputStream inputStream = fs.open(dst);
byte[] bytes = IOUtils.toByteArray(inputStream);
HttpHeaders headers = new HttpHeaders();
headers.setContentDispositionFormData("attachment", dst.getName());
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
return new ResponseEntity<>(bytes, headers, HttpStatus.CREATED);
}






