js实现将二进制字符串转换为整数如:str="10010",求整数表示一条指令即可:parseInt(str,2)。 =>18toString是将字符串表示为二进制的数: str.toString(2) ==>10010