jquery学习---Day-1(引用jquery和入口函数).md

MeowRain
2021年07月31日 阅读:183
title: jquery学习-- Day 1(引用jquery和入口函数)
categories: 🥭笔记
tags: [jquery]
date: 2021-02-17 22:14:00
jquery学习 - Day 1
[card title="引用jquery" color="success"]
引用下载地址:
jsdeliver -query引用地址:https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
各版本引用地址:
https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
[/card]
隐藏元素-初次使用jquery(jquery入口函数)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
<style>
div {
width: 200px;
height: 200px;
background-color: red;
}
</style>
</head>
<body>
<div>
fdsahfsjdiofdsfkas
</div>
<script>
$(function(){
$('div').hide();
})
//打开待DOM加载完毕后会隐藏div元素
</script>
</body>
</html>
分类:
无
标签:
无