1 var s = "123"; 2 console.log(s.charAt(0)*100+s.charAt(1)*10+s.charAt(2)*1); 转载于:https://www.cnblogs.com/angle-happy/p/5926715.html