JavaScript 10进制和16进制相互转换
// convert base 10 to 16 (dec to hex)
parseInt(10, 10).toString(16);
// convert base 16 to 10
parseInt('a', 16).toString(10)
JavaScript 10进制和16进制相互转换
// convert base 10 to 16 (dec to hex)
parseInt(10, 10).toString(16);
// convert base 16 to 10
parseInt('a', 16).toString(10)