From e1138c7ad871514ac0e5adc5fc76e3d89b5ab6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Fri, 18 Nov 2022 09:22:35 +0000 Subject: [PATCH 1/9] =?UTF-8?q?35.=E9=BB=84=E6=9F=B1=E8=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄柱菘 <2365839121@qq.com> --- .../11.18\347\254\224\350\256\260.txt" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" new file mode 100644 index 0000000..e69de29 -- Gitee From 6a475a0c0b1cb09067ef3d332f26fe8d5262e891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Fri, 18 Nov 2022 09:23:05 +0000 Subject: [PATCH 2/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98/=E9=BB=84=E6=9F=B1=E8=8F=98.35/11.1?= =?UTF-8?q?8=E7=AC=94=E8=AE=B0.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../11.18\347\254\224\350\256\260.txt" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" deleted file mode 100644 index e69de29..0000000 -- Gitee From 3e195a08fcd3a18d3650edc2eeed1877178cf386 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Fri, 18 Nov 2022 09:25:26 +0000 Subject: [PATCH 3/9] =?UTF-8?q?35.=E9=BB=84=E6=9F=B1=E8=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄柱菘 <2365839121@qq.com> --- .../11.18\347\254\224\350\256\260.txt" | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" new file mode 100644 index 0000000..5f2448c --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.18\347\254\224\350\256\260.txt" @@ -0,0 +1,14 @@ +Javascript 与DOM的关系: +DOM定义了表示和修改文档所需的方法,DOM对象即为宿主对象,由浏览器厂商定义,用来操作html和xml功能的一类的对象的集合。也有人称DOM是对HTML以及XML的标准编程接口。 + DOM常用API + 文档级节点 +document:DOM中最大的节点 +document.documentElement +document.head +document.title(可修改):获取标题 +document.body +子节点: 文本节点+元素节点 + 元素节点 | 属性节点 | 文本节点 | 注释节点 | +nodeType | 1 | 2 | 3 | 8 | +nodeName| 元素名| 属性名 | #text | #comment | +nodeValue | null | 属性值 | 文本值 | 注释的文本 | \ No newline at end of file -- Gitee From c1ae03279b039f5d2b43349d124459c0e720c232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Tue, 22 Nov 2022 15:35:18 +0000 Subject: [PATCH 4/9] =?UTF-8?q?35=20=E9=BB=84=E6=9F=B1=E8=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄柱菘 <2365839121@qq.com> --- .../11.20.html" | 36 +++++++++++++++++++ .../11.21\347\254\224\350\256\260.txt" | 8 +++++ 2 files changed, 44 insertions(+) create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.20.html" create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.21\347\254\224\350\256\260.txt" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.20.html" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.20.html" new file mode 100644 index 0000000..3850b53 --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.20.html" @@ -0,0 +1,36 @@ + + + + + + + Document + + + + + + + + \ No newline at end of file diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.21\347\254\224\350\256\260.txt" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.21\347\254\224\350\256\260.txt" new file mode 100644 index 0000000..a54bf5e --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.21\347\254\224\350\256\260.txt" @@ -0,0 +1,8 @@ +setAttribute +元素.setAttribute('属性名',属性值) +设置元素的行间属性,如果原来有这个行间属性会覆盖原来的行间属性 +可以通过该方法给元素新增自定义行间属性 +getAttribute +元素.getAttribute('属性名') +获取元素的行间属性对应的属性值,不能获取css样式对应的属性值 +如果获取的属性不存在返回null \ No newline at end of file -- Gitee From 5b0bfdeff917296b37b99804412b309282094e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Thu, 24 Nov 2022 05:13:23 +0000 Subject: [PATCH 5/9] =?UTF-8?q?35=20=E9=BB=84=E6=9F=B1=E8=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄柱菘 <2365839121@qq.com> --- .../11.23.html" | 19 +++++++++++++++++++ .../11.23\347\254\224\350\256\260.txt" | 8 ++++++++ 2 files changed, 27 insertions(+) create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23\347\254\224\350\256\260.txt" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" new file mode 100644 index 0000000..b0254a0 --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" @@ -0,0 +1,19 @@ + + + + + + + Document + + + + + + \ No newline at end of file diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23\347\254\224\350\256\260.txt" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23\347\254\224\350\256\260.txt" new file mode 100644 index 0000000..eeb4d64 --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23\347\254\224\350\256\260.txt" @@ -0,0 +1,8 @@ +什么是事件 +事件就是可以被js侦测到的行为 简单理解就是用户操作鼠标或者键盘后,触发了js事件,然后产生对应的机制 +var btn = document,getElementById(“btn”); +btn.onclick = function (){ +} +事件的三要素 事件源>事件类型>事件处理程序 事件源: 事件被触发的对象,就是谁触发了这个事件 事件类型: 如何触发,什么事件 +事件执行的步骤 1、获取事件源 2、注册事件(也叫绑定事件) 3、添加事件处理程序( 一般用function函数) +操作元素 javascript的Dom操作可以改变网页内容,结构和样式,可以利用Dom操作元素来改变元素里面的内容 属性等 \ No newline at end of file -- Gitee From ddfbe02c656fce9a72cecba3119cbbdce9239af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Thu, 24 Nov 2022 05:13:56 +0000 Subject: [PATCH 6/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98/=E9=BB=84=E6=9F=B1=E8=8F=98.35/11.2?= =?UTF-8?q?3.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../11.23.html" | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" deleted file mode 100644 index b0254a0..0000000 --- "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - Document - - - - - - \ No newline at end of file -- Gitee From 197520b8d0047ee8f16483eadf3744f1f4ef5f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Thu, 24 Nov 2022 05:14:54 +0000 Subject: [PATCH 7/9] =?UTF-8?q?35=20=E9=BB=84=E6=9F=B1=E8=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄柱菘 <2365839121@qq.com> --- .../11.23.html" | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" new file mode 100644 index 0000000..c3e54a1 --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.23.html" @@ -0,0 +1,19 @@ + + + + + + + Document + + + + + + \ No newline at end of file -- Gitee From 845d06854fde034a4c38a5f8bb6937aff98290d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Fri, 25 Nov 2022 04:55:12 +0000 Subject: [PATCH 8/9] =?UTF-8?q?35=20=E9=BB=84=E6=9F=B1=E8=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄柱菘 <2365839121@qq.com> --- .../11.24\347\254\224\350\256\260.txt" | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.24\347\254\224\350\256\260.txt" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.24\347\254\224\350\256\260.txt" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.24\347\254\224\350\256\260.txt" new file mode 100644 index 0000000..cd1bd1c --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.24\347\254\224\350\256\260.txt" @@ -0,0 +1,7 @@ +click 单击鼠标左键时发生,如果右键也按下则不会发生。当用户的焦点在按钮上并按了 Enter 键时,同样会触发这个事件 +dblclick 双击鼠标左键时发生,如果右键也按下则不会发生 +mousedown 单击任意一个鼠标按钮时发生 +mouseout 鼠标指针位于某个元素上且将要移出元素的边界时发生 +mouseover 鼠标指针移出某个元素到另一个元素上时发生 +mouseup 松开任意一个鼠标按钮时发生 +mousemove 鼠标在某个元素上时持续发生 \ No newline at end of file -- Gitee From eb982fbc743406b3bd30c0ccd059999b8f598b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=9F=B1=E8=8F=98?= <2365839121@qq.com> Date: Thu, 1 Dec 2022 05:25:34 +0000 Subject: [PATCH 9/9] =?UTF-8?q?35=20=E9=BB=84=E6=9F=B1=E8=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄柱菘 <2365839121@qq.com> --- .../11.30\347\254\224\350\256\260.txt" | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 "\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.30\347\254\224\350\256\260.txt" diff --git "a/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.30\347\254\224\350\256\260.txt" "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.30\347\254\224\350\256\260.txt" new file mode 100644 index 0000000..8d4dd50 --- /dev/null +++ "b/\351\273\204\346\237\261\350\217\230/\351\273\204\346\237\261\350\217\230.35/11.30\347\254\224\350\256\260.txt" @@ -0,0 +1,22 @@ +合成事件hover +通常来说,mouseover和mouseout是一对形影不离的事件,而且实际工作中用的比较多。所以jQuery中定义了hover事件表示这两事件的触发 +语法:js$().hover(fn1, fn2) + 解绑事件 +我们可以使用off()方法来解除元素绑定的事件。jQuery的off()方法,有点类似于JavaScript的 +removeEventListener()方法。 +语法:html$(selector).off(type) 移除所有事件:off() +事件对象 +当一个事件发生的时候,这个事件有关的详细信息都会临时保存到一个指定的地方,这个地方就是 event对象。每一个事件,都有一个对应的event对象。 +在jQuery中,我们可以通过event对象来获取一个事件的详细信息。以下是常用的属性: + + 属性 | 说明 | +| :----------: | :--------------: | +| type | 事件类型 | +| target | 事件元素 | +| which | 鼠标左,中,右键 | +| pageX,pageY | 鼠标坐标 | +| shiftKey | 是否按下shift键 | +| altKey | 是否按下alt键 | +| keyCode | 键码值 | +| | | +在jQuery中,我们可以使用event对象的type属性来获取事件的类型。 -- Gitee