Skip to content

Commit fa2cbeb

Browse files
committed
获取当前路径
1 parent 6a1f23f commit fa2cbeb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

currentPageUrl.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @description 获取当前路径
3+
* @author 未知
4+
*/
5+
6+
var currentPageUrl = "";
7+
if (typeof this.href === "undefined") {
8+
currentPageUrl = document.location.toString().toLowerCase();
9+
}else {
10+
currentPageUrl = this.href.toString().toLowerCase();
11+
}

0 commit comments

Comments
 (0)