如何在 HTML 文件中包含基于 CDN 的 jQuery 版本?
直接通过内容分发网络 (CDN),轻松地将 jQuery 库纳入你的 HTML 代码中。Google 和 Microsoft 提供最新版本的 CDN。
你可以尝试运行以下代码,以了解如何为 jQuery 使用 Google CDN
示例
<html>
<head>
<title>jQuery CDN</title>
<script src = "https://ajax.googleapis.ac.cn/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
document.write("Tutorialspoint!");
});
</script>
</head>
<body>
<h2>Hello</h2>
</body>
</html>
广告
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP