js
This commit is contained in:
		
							parent
							
								
									74e6f8295e
								
							
						
					
					
						commit
						6231dbaeda
					
				
							
								
								
									
										
											BIN
										
									
								
								javascript/17style操作.assets/2020060423401084.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								javascript/17style操作.assets/2020060423401084.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 8.1 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 332 KiB  | 
@ -14,7 +14,30 @@ el.style.css = value
 | 
			
		||||
- removeProperty 删除css属性
 | 
			
		||||
- setProperty 设置css属性
 | 
			
		||||
 | 
			
		||||
## 元素尺寸
 | 
			
		||||
## 偏移尺寸
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
这些都是相对于父元素的
 | 
			
		||||
 | 
			
		||||
## 客户端尺寸
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
元素内部空间
 | 
			
		||||
 | 
			
		||||
## 滚动尺寸
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## 确定元素尺寸
 | 
			
		||||
 | 
			
		||||
getBoundingClientRect()
 | 
			
		||||
 | 
			
		||||
- letf
 | 
			
		||||
- right
 | 
			
		||||
- top
 | 
			
		||||
- bottom
 | 
			
		||||
- height
 | 
			
		||||
- width
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										21
									
								
								javascript/18事件.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								javascript/18事件.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
			
		||||
# 事件
 | 
			
		||||
 | 
			
		||||
## 事件处理
 | 
			
		||||
 | 
			
		||||
### html 
 | 
			
		||||
 | 
			
		||||
- onclick
 | 
			
		||||
 | 
			
		||||
> event
 | 
			
		||||
 | 
			
		||||
### js
 | 
			
		||||
 | 
			
		||||
- addEventListener("")
 | 
			
		||||
- revomeEventListenet()
 | 
			
		||||
 | 
			
		||||
> 注意匿名函数
 | 
			
		||||
 | 
			
		||||
## 事件类型
 | 
			
		||||
 | 
			
		||||
.....
 | 
			
		||||
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
							
								
								
									
										9
									
								
								javascript/19事件流.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								javascript/19事件流.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
#  事件冒泡与捕获
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
事件冒泡会从内往外厨房事件
 | 
			
		||||
 | 
			
		||||
事件捕获会从外向内触发(传播)
 | 
			
		||||
 | 
			
		||||
使用监听事件 第三个参数 ture 就是事件捕获 
 | 
			
		||||
							
								
								
									
										6
									
								
								javascript/20事件委托.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								javascript/20事件委托.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
			
		||||
# 事件委托
 | 
			
		||||
 | 
			
		||||
> 
 | 
			
		||||
>
 | 
			
		||||
> 依赖于事件冒泡来搞 只需要在最外面监听 id
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										17
									
								
								javascript/21 http请求.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								javascript/21 http请求.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
			
		||||
# xhr
 | 
			
		||||
 | 
			
		||||
var xhr = new XMLHttpRequest()
 | 
			
		||||
 | 
			
		||||
xhr.open(method,"url,是否同步)
 | 
			
		||||
 | 
			
		||||
xhr.open(body)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
xhr.open("get","url",false)
 | 
			
		||||
xhr.send(null)
 | 
			
		||||
// xhr.status 状态码
 | 
			
		||||
// xhr.responseText 后台返回内容
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										9
									
								
								javascript/22.定时器.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								javascript/22.定时器.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
# 定时器
 | 
			
		||||
 | 
			
		||||
setTimeout
 | 
			
		||||
 | 
			
		||||
setTnterval
 | 
			
		||||
 | 
			
		||||
crearTimeout()
 | 
			
		||||
 | 
			
		||||
crearInterval()
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user