javascript将字符串转换为8进制的方法:1、使用parseInt()函数将字符串转为十进制数,语法“parseInt("字符串")”;2、使用toString()函数将十进制数转为8进制数,语法“十进制数.toS