js调用toString方法转为字符串后取长度 var num = 123; alert(num.toString().length); 转载于:https://www.cnblogs.com/wanlibingfeng/p/9198699.html