doc: create common types of JS Events

This commit is contained in:
Leon Xu committed 2021-08-31 15:30:48 -07:00
1 parent d3a8decdfa
commit d7530dbeea
1 file changed
+14 -1
+14 -1
View File
@@ -99,4 +99,17 @@ function handleFunction () {
```javascript
addEventListener("click", openBox);
```
![事件处理](/images/Event-Handling.png)
![事件处理](/images/Event-Handling.png)
## 常见的JavaScript事件类型
| 名称 | 描述 |
| ----------- | ----------- |
| load | 网页已完成文件加载 |
| scroll | 用户已向上或向下滚动页面 |
| click | 一个指向设备(如鼠标)被按下并释放在一个元素上 |
| dblclick | 在同一个元素上单击两次指向设备按钮 |
| keydown | 按下任意键 |
| keyup | 任意键被释放 |
你可以在[这里](https://developer.mozilla.org/en-US/docs/Web/Events)找到完整的列表