如何在我的 HTML 文件中引入基于 CDN 的 jQuery 版本?
jqueryweb developmentfront end technology
您可以轻松地直接从内容分发网络 (CDN) 将 jQuery 库引入到您的 HTML 代码中。Google 和 Microsoft 为最新版本提供内容分发服务。
您可以尝试运行以下代码,了解如何使用 Google CDN 来获取 jQuery:
示例
<html>
<head>
<title>jQuery CDN</title>
<script src = "https://ajax.googleapis.com/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>

