判定是否整数。
//http://www.cnblogs.com/rubylouvre/ by 司徒正美 function isInt (x) { var y = parseInt(x, 10); if (isNaN(y)) { return false; } return (x == y) && (x.toString() == y.toString()); };