如何从Google CDN链接jQuery?
要从GoogleCDN链接jQuery,请在script标签的src属性中添加以下内容。
https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js
在这里,我们正在使用该库的GoogleCDN版本。您可以尝试运行以下代码,以了解如何使用GoogleCDN链接jQuery。
示例
<html>
<head>
<title>jQuery CDN</title>
<script src = "https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
document.write("Hello, World!");
});
</script>
</head>
<body>
<h1>Hello</h1>
</body>
</html>