Created
October 30, 2014 06:09
-
-
Save bh-lay/e837c40d2846525397ce to your computer and use it in GitHub Desktop.
check a variable is number include like number string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 检测是否为数字 | |
| * 兼容字符类数字 '23' | |
| */ | |
| function isNum(ipt){ | |
| return (ipt !== '') && (ipt == +ipt) ? true : false; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment