File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1120,6 +1120,38 @@ div1.removeChild(child[0]);
11201120 * DOM节点的操作
11211121 * DOM结构操作
11221122
1123+ ## 04-06
1124+ ### BOM操作
1125+ * Browser Object Model
1126+ #### 如何监测浏览器的类型
1127+ #### 拆解url的各部分
1128+ #### 知识点
1129+ * ` navigator & screen `
1130+
1131+ ``` JavaScript
1132+ // navigator
1133+ var ua = navigator .userAgent ;
1134+ var isChrome = ua .indexOf (' Chrome' );
1135+ console .log (isChrome);
1136+ // screen
1137+ console .log (screen .width );
1138+ console .log (screen .height );
1139+ ```
1140+
1141+ * ` location & history `
1142+ ``` JavaScript
1143+ // location
1144+ console .log (location .href );
1145+ console .log (location .protocel );
1146+ console .log (location .pathname );
1147+ console .log (location .search );
1148+ console .log (location .hash );
1149+ // history
1150+ history .back ();
1151+ history .forward ();
1152+ ```
1153+
1154+
11231155---
11241156
11251157### JSDemo JS小程序
You can’t perform that action at this time.
0 commit comments