检测一段字符串是不是数字

// alert( str.length );
// alert( str.charAt() );

// alert( str.charCodeAt() ); // 22937
// alert( str.charCodeAt(1) ); // 21619

alert( str.charCodeAt() ); // 0~9 48~57 a~z 97~122 A~Z 65~90

// alert( String.fromCharCode(22937, 21619) );

原文地址:https://www.cnblogs.com/hduhdc/p/5277221.html