diff --git "a/49 \346\235\216\350\210\222\346\261\266/10.27\345\237\272\347\241\200\347\273\203\344\271\240.md" "b/49 \346\235\216\350\210\222\346\261\266/10.27\345\217\230\351\207\217\345\222\214\346\225\260\346\215\256\347\261\273\345\236\213.md" similarity index 100% rename from "49 \346\235\216\350\210\222\346\261\266/10.27\345\237\272\347\241\200\347\273\203\344\271\240.md" rename to "49 \346\235\216\350\210\222\346\261\266/10.27\345\217\230\351\207\217\345\222\214\346\225\260\346\215\256\347\261\273\345\236\213.md" diff --git "a/49 \346\235\216\350\210\222\346\261\266/20231108\350\241\250\345\215\225\345\222\214\345\256\232\346\227\266\345\231\250.md" "b/49 \346\235\216\350\210\222\346\261\266/20231108\350\241\250\345\215\225\345\222\214\345\256\232\346\227\266\345\231\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..3130b3948404de22833769c0577c2ce7ca0fee2c --- /dev/null +++ "b/49 \346\235\216\350\210\222\346\261\266/20231108\350\241\250\345\215\225\345\222\214\345\256\232\346\227\266\345\231\250.md" @@ -0,0 +1,392 @@ +## 表单与定时器 + +#### 操作表单元素属性 + +表单很多情况,也需要修改属性,比如点击眼睛,可以看到密码,本质是把表单类型转换为文本框 + +正常的有属性有取值的跟其他的标签属性没有任何区别 + +获取:DOM对象.属性名 + +设置:DOM对象.属性名= 新值 + +```html + + + + + + + + Document + + + + + + + + + + + +``` +### 自定义属性 + +标准属性: 标签天生自带的属性 比如class id title等, 可以直接使用点语法操作比如: disabled、checked、selected + +自定义属性: + +在html5中推出来了专门的data-自定义属性 + +在标签上一律以data-开头 + +在DOM对象上一律以dataset对象方式获取 + +~~~html + + + + + + + + Document + + + + +
自定义属性
+ + + + +~~~ + +### 间歇函数 + +> 知道间歇函数的作用,利用间歇函数创建定时任务。 + +`setInterval` 是 JavaScript 中内置的函数,它的作用是间隔固定的时间自动重复执行另一个函数,也叫定时器函数。 + +```html + +``` + +### 修改表单属性 + +```html + + + + + + 专业: + + +``` + +### 自定义属性 + +```html + +
1
+
2
+
3
+
4
+
5
+ + + +``` + +### 定时器 + +```html + + + +``` + +### 用户注册倒计时 + +```html + + +
+ + + +``` + +## 作业 + +### 轮播图定时版 + +```html + + +
+
+ +
+ +
+ + +``` \ No newline at end of file diff --git "a/49 \346\235\216\350\210\222\346\261\266/20231109\347\233\221\345\220\254\345\231\250.md" "b/49 \346\235\216\350\210\222\346\261\266/20231109\347\233\221\345\220\254\345\231\250.md" new file mode 100644 index 0000000000000000000000000000000000000000..d0a0d6af831c509707107ef9ff717e34a264e948 --- /dev/null +++ "b/49 \346\235\216\350\210\222\346\261\266/20231109\347\233\221\345\220\254\345\231\250.md" @@ -0,0 +1,420 @@ +## 监听器 + +```html + +

事件监听

+

为 DOM 元素添加事件监听,等待事件发生,便立即执行一个函数。

+ + + +``` + +```html + + + + +``` + +### 点击关闭 + +```html + +
+ 我是广告 +
X
+
+ + + +``` + +### 随机点名案例 + +```html + + +

随机点名

+
+ 名字是: +
这里显示姓名
+
+
+ + +
+ + +``` + +oncilck 和 addEventListener 的区别 + +```html + + + + +``` + +```html + +
111
+ + +``` + +### 轮播图 + +```html + + + + + + + + 轮播图点击切换 + + + + +
+
+ +
+ +
+ + + +``` \ No newline at end of file diff --git "a/49 \346\235\216\350\210\222\346\261\266/20231122\346\227\245\346\234\237\346\227\266\351\227\264\345\222\214\350\212\202\347\202\271.md" "b/49 \346\235\216\350\210\222\346\261\266/20231122\346\227\245\346\234\237\346\227\266\351\227\264\345\222\214\350\212\202\347\202\271.md" new file mode 100644 index 0000000000000000000000000000000000000000..ee813b8916878e81265b7ccb7d35c9c18a431788 --- /dev/null +++ "b/49 \346\235\216\350\210\222\346\261\266/20231122\346\227\245\346\234\237\346\227\266\351\227\264\345\222\214\350\212\202\347\202\271.md" @@ -0,0 +1,855 @@ +### 实例化日期对象 + +```html + +``` + +### 常见的日期对象方法 + +```html + +``` + +### 时间的另一个写法 + +```html + + +
+ + +``` + +### 得到时间戳 + +```html + +``` + +### 父节点 + +```html + +
+
+
x
+
+
+ + +``` + +### 子节点 + +```html + + + + +``` + +### 增加节点 + +```html + + + + +``` + +### 克隆节点 + +```html + + + + +``` + +### 删除节点 + +```html + +
123
+ + + +``` + +### 显示格式化时间 + +```html + + +
+ + + +``` + +### 倒计时 + +```html + + +
+

今天是2023年11月21日

+

下班倒计时

+

+ 00 + : + 25 + : + 20 +

+

17:40:00下课

+
+ + +``` + +### 点击关闭 + +```html + + +
+ 我是广告 +
X
+
+ + +``` + + + +### 学生信息案例 + +```html + + + + + + + + 学生信息管理 + + + + +

新增学员

+
+ 姓名: + 年龄: + 性别: + + 薪资: + 就业城市: + +
+ +

就业榜

+ + + + + + + + + + + + + + + +
学号姓名年龄性别薪资就业城市操作
+ + + +``` + +css 样式 + +```css +* { + margin: 0; + padding: 0; +} + +a { + text-decoration: none; + color:#721c24; +} +h1 { + text-align: center; + color:#333; + margin: 20px 0; + +} +table { + margin:0 auto; + width: 800px; + border-collapse: collapse; + color:#004085; +} +th { + padding: 10px; + background: #cfe5ff; + + font-size: 20px; + font-weight: 400; +} +td,th { + border:1px solid #b8daff; +} +td { + padding:10px; + color:#666; + text-align: center; + font-size: 16px; +} +tbody tr { + background: #fff; +} +tbody tr:hover { + background: #e1ecf8; +} +.info { + width: 900px; + margin: 50px auto; + text-align: center; +} +.info input, .info select { + width: 80px; + height: 27px; + outline: none; + border-radius: 5px; + border:1px solid #b8daff; + padding-left: 5px; + box-sizing: border-box; + margin-right: 15px; +} +.info button { + width: 60px; + height: 27px; + background-color: #004085; + outline: none; + border: 0; + color: #fff; + cursor: pointer; + border-radius: 5px; +} +.info .age { + width: 50px; +} +``` + +### 重构 + +```html + + + + + + + + 学车在线首页 + + + + + + +
+
+

精品推荐

+ 查看全部 +
+
+ +
+
+ + + + +``` + +css 样式 + +```css +* { + margin: 0; + padding: 0; +} +.w { + width: 1200px; + margin: auto; +} +body { + background-color: #f3f5f7; +} +li { + list-style: none; +} +a { + text-decoration: none; +} +.clearfix:before,.clearfix:after { + content:""; + display:table; + } + .clearfix:after { + clear:both; + } + .clearfix { + *zoom:1; + } + + +.box { + margin-top: 30px; +} +.box-hd { + height: 45px; +} +.box-hd h3 { + float: left; + font-size: 20px; + color: #494949; +} +.box-hd a { + float: right; + font-size: 12px; + color: #a5a5a5; + margin-top: 10px; + margin-right: 30px; +} +/* 把li 的父亲ul 修改的足够宽一行能装开5个盒子就不会换行了 */ +.box-bd ul { + width: 1225px; +} +.box-bd ul li { + position: relative; + top: 0; + float: left; + width: 228px; + height: 270px; + background-color: #fff; + margin-right: 15px; + margin-bottom: 15px; + transition: all .3s; + +} +.box-bd ul li a { + display: block; +} +.box-bd ul li:hover { + top: -8px; + box-shadow: 0 15px 30px rgb(0 0 0 / 10%); +} +.box-bd ul li img { + width: 100%; +} +.box-bd ul li h4 { + margin: 20px 20px 20px 25px; + font-size: 14px; + color: #050505; + font-weight: 400; +} +.box-bd .info { + margin: 0 20px 0 25px; + font-size: 12px; + color: #999; +} +.box-bd .info span { + color: #ff7c2d; +} +``` \ No newline at end of file diff --git "a/49 \346\235\216\350\210\222\346\261\266/20231124\345\273\266\350\277\237\345\207\275\346\225\260.md" "b/49 \346\235\216\350\210\222\346\261\266/20231124\345\273\266\350\277\237\345\207\275\346\225\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..481e93fa3a37d0e7286f7075c69f78105a0b9aeb --- /dev/null +++ "b/49 \346\235\216\350\210\222\346\261\266/20231124\345\273\266\350\277\237\345\207\275\346\225\260.md" @@ -0,0 +1,529 @@ +### 延迟函数 + +```html + +``` + +### 延迟函数的执行顺序 + +```html + +``` + +### location 对象 + +```html + +``` + +### history 对象 + +```html + + + + + +``` + +### localStorage 存储 + +```html + + + +``` + +### 本地存储复杂数据类型 + +```html + + + +``` + +### 数组map方法 + +```html + +``` + +### 数组的join方法 + +```html + +``` + +### 5秒自动关闭的广告 + +```html + + + + + +``` + +### 5秒钟之后自动跳转页面 + +```html + + + 支付成功5秒钟之后跳转到首页 + + +``` + +### 自动跳转到移动端 + +```html + +``` + +### 学生信息表案例 + +```html + +

新增学员

+
+ 姓名: + 年龄: + 性别: + + 薪资: + 就业城市: + +
+ +

就业榜

+ + + + + + + + + + + + + + + +
学号姓名年龄性别薪资就业城市操作
+ + +``` + +css 样式 + +```css +* { + margin: 0; + padding: 0; +} + +a { + text-decoration: none; + color:#721c24; +} +h1 { + text-align: center; + color:#333; + margin: 20px 0; + +} +table { + margin:0 auto; + width: 800px; + border-collapse: collapse; + color:#004085; +} +th { + padding: 10px; + background: #cfe5ff; + + font-size: 20px; + font-weight: 400; +} +td,th { + border:1px solid #b8daff; +} +td { + padding:10px; + color:#666; + text-align: center; + font-size: 16px; +} +tbody tr { + background: #fff; +} +tbody tr:hover { + background: #e1ecf8; +} +.info { + width: 900px; + margin: 50px auto; + text-align: center; +} +.info input, .info select { + width: 80px; + height: 27px; + outline: none; + border-radius: 5px; + border:1px solid #b8daff; + padding-left: 5px; + box-sizing: border-box; + margin-right: 15px; +} +.info button { + width: 60px; + height: 27px; + background-color: #004085; + outline: none; + border: 0; + color: #fff; + cursor: pointer; + border-radius: 5px; +} +.info .age { + width: 50px; +} +```