From be6a9e845c6d402a6adb62d3818cfef5ed588790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=8E=AE=E5=96=86?= Date: Thu, 24 Nov 2022 12:49:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=AC=AC=E5=8D=81=E4=B9=9D=E6=AC=A1?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\344\275\234\344\270\232/2022.11.23.html" | 43 +++++++++++++++++++ .../2022.11.23-\344\272\213\344\273\266.md" | 13 ++++++ 2 files changed, 56 insertions(+) create mode 100644 "04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.23.html" create mode 100644 "04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.23-\344\272\213\344\273\266.md" diff --git "a/04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.23.html" "b/04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.23.html" new file mode 100644 index 0000000..6da7598 --- /dev/null +++ "b/04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.23.html" @@ -0,0 +1,43 @@ + + + + + + + + Document + + + + + + + + + + \ No newline at end of file diff --git "a/04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.23-\344\272\213\344\273\266.md" "b/04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.23-\344\272\213\344\273\266.md" new file mode 100644 index 0000000..0e47977 --- /dev/null +++ "b/04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.23-\344\272\213\344\273\266.md" @@ -0,0 +1,13 @@ +# 15、事件 + +需要设置事件的对象.addEventListener(事件类型,需要执行的函数,Boolean):设置事件 + +需要取消事件的对象.removeEventListener(事件类型,需要执行的函数):取消事件 + +## 事件流 + +.addEventListener(事件类型,需要执行的函数,Boolean):默认false表示冒泡;true:捕获 + +冒泡:从内往外 + +捕获:从外往内 -- Gitee From 24f4c1ce3ce0e2b4ad17d3742b6835e38ebda5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E7=8E=AE=E5=96=86?= Date: Fri, 25 Nov 2022 13:10:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E5=8D=81=E6=AC=A1?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\344\275\234\344\270\232/2022.11.24.html" | 39 +++++++++++++++++++ ...4-\344\272\213\344\273\266\344\270\213.md" | 21 ++++++++++ 2 files changed, 60 insertions(+) create mode 100644 "04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.24.html" create mode 100644 "04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.24-\344\272\213\344\273\266\344\270\213.md" diff --git "a/04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.24.html" "b/04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.24.html" new file mode 100644 index 0000000..a78d2dc --- /dev/null +++ "b/04\351\203\221\347\216\256\345\226\206/\344\275\234\344\270\232/2022.11.24.html" @@ -0,0 +1,39 @@ + + + + + + + + Document + + + +
+ 狗 + 猫 + 鼠 +
+

+ + + + \ No newline at end of file diff --git "a/04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.24-\344\272\213\344\273\266\344\270\213.md" "b/04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.24-\344\272\213\344\273\266\344\270\213.md" new file mode 100644 index 0000000..198008c --- /dev/null +++ "b/04\351\203\221\347\216\256\345\226\206/\347\254\224\350\256\260/2022.11.24-\344\272\213\344\273\266\344\270\213.md" @@ -0,0 +1,21 @@ +# 15、事件 + +需要设置事件的对象.addEventListener(事件类型,需要执行的函数,Boolean):设置事件 + +需要取消事件的对象.removeEventListener(事件类型,需要执行的函数):取消事件 + +## 事件流 + +.addEventListener(事件类型,需要执行的函数,Boolean):默认false表示冒泡;true:捕获 + +冒泡:从内往外 + +捕获:从外往内 + +## 事件对象 + +事件对象产生时间:当有事件触发的时候,会自动生成事件对象 + +事件源对象:触发该事件的对象:event.target + +阻止默认行为:e.preventDefault(); -- Gitee