diff --git "a/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/20241122 \350\212\202\347\202\271.md" "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/20241122 \350\212\202\347\202\271.md" new file mode 100644 index 0000000000000000000000000000000000000000..b6a3ec15fdcfbb45b9d000a721a717072a4a064f --- /dev/null +++ "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/20241122 \350\212\202\347\202\271.md" @@ -0,0 +1,308 @@ +## 课堂笔记 + +### **节点** + +#### **具体语法** + +**插入节点** + +```javascript +// 获取对象 +const box = document.querySelector('.box') + +// 动态创建任意 DOM 节点 +box.createElement(节点) + +// 复制现有的 DOM 节点,传入参数 true 会复制所有子节点 +box.cloneNode(节点) + +// 在末尾(结束标签前)插入节点 +box.appendChild(节点) + +// 在父节点中任意子节点之前插入新节点 +box.insertBefore(要插入节点后的节点位置,节点) +``` + +**删除节点** + +```javascript +// 获取对象 +const box = document.querySelector('.box') + +// 删除节点时一定是由父子关系。 +box.removeChild(节点) +``` + +**查找节点** + +```javascript +// 获取对象 +const box = document.querySelector('.box') + +// 获取全部的子节点,回车换行会被认为是空白文本节点 +box.childNodes + +// 只获取元素类型节点 +box.children + +// 获取父节点,以相对位置查找节点,实际应用中非常灵活 +box.parentNode + +// 获取前一个节点,以相对位置查找节点,实际应用中非常灵活 +box.previousSibling + +// 获取后一个节点,以相对位置查找节点,实际应用中非常灵活 +box.nextSibling +``` + +## 课后作业 + +**点击关闭** + +```html + + + + + + + + Document + + + + +
+ 我是广告1 +
X
+
+
+ 我是广告2 +
X
+
+
+ 我是广告3 +
X
+
+ + + + +``` + +**学生信息表案例** + +```html + + + + + + + + 学生信息管理 + + + + +

新增学员

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

就业榜

+ + + + + + + + + + + + + + + +
学号姓名年龄性别薪资就业城市操作
+ + + + +``` + diff --git "a/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/08.2-\347\202\271\345\207\273\345\205\263\351\227\255.html" "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/08.2-\347\202\271\345\207\273\345\205\263\351\227\255.html" new file mode 100644 index 0000000000000000000000000000000000000000..e6f16f4d42105b2d8bb55f1f59eae9df46ebd678 --- /dev/null +++ "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/08.2-\347\202\271\345\207\273\345\205\263\351\227\255.html" @@ -0,0 +1,77 @@ + + + + + + + + Document + + + + +
+ 我是广告1 +
X
+
+
+ 我是广告2 +
X
+
+
+ 我是广告3 +
X
+
+ + + + \ No newline at end of file diff --git "a/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/css/index.css" "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/css/index.css" new file mode 100644 index 0000000000000000000000000000000000000000..bf537709ea7ef92a9f3564533646f812e737c65b --- /dev/null +++ "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/css/index.css" @@ -0,0 +1,71 @@ +* { + 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; +} \ No newline at end of file diff --git "a/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/\345\255\246\347\224\237\344\277\241\346\201\257\350\241\250\346\241\210\344\276\213.html" "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/\345\255\246\347\224\237\344\277\241\346\201\257\350\241\250\346\241\210\344\276\213.html" new file mode 100644 index 0000000000000000000000000000000000000000..22cd3fd453747a7985b41936120740cbd7967878 --- /dev/null +++ "b/\350\224\241\347\216\256\351\223\255/20241122 \350\212\202\347\202\271/html\346\226\207\344\273\266/\345\255\246\347\224\237\344\277\241\346\201\257\350\241\250\346\241\210\344\276\213.html" @@ -0,0 +1,162 @@ + + + + + + + + 学生信息管理 + + + + +

新增学员

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

就业榜

+ + + + + + + + + + + + + + + +
学号姓名年龄性别薪资就业城市操作
+ + + + \ No newline at end of file