Skip to content

Commit d395f31

Browse files
committed
判断是否为数字类型
1 parent a3a749a commit d395f31

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

isDigit.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* @description 判断是否为数字类型
3+
* @author 未知
4+
*/
5+
6+
function isDigit(value) {
7+
var patrn = /^[0-9]*$/;
8+
if (patrn.exec(value) == null || value == "") {
9+
return false
10+
} else {
11+
return true
12+
}
13+
}

0 commit comments

Comments
 (0)