(int).toString(16); // converts int to hex, eg 12 => "C" (int).toString(8); // converts int to octal, eg. 12 => "14" parseInt(string,16) // converts hex to int, eg. "FF" => 255 parseInt(string,8) // converts octal to int, eg. "20" => 16
js数值进制转换
最新推荐文章于 2024-07-26 15:50:20 发布