//十进制转其他
var x=110;
alert(x);
alert(x.toString(8));
alert(x.toString(32));
alert(x.toString(16));  //.toUpperCase()
//其他转十进制
var x='110';
alert(parseInt(x,2));
alert(parseInt(x,8));
alert(parseInt(x,16));
//其他转其他
//先用parseInt转成十进制再用toString转到目标进制
alert(String.fromCharCode(parseInt(141,8)))
alert(parseInt('ff',16).toString(2));

相关文章:

  • 2021-07-27
  • 2021-08-22
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-07
  • 2021-05-21
  • 2022-12-23
  • 2021-08-17
  • 2021-06-03
  • 2021-12-04
相关资源
相似解决方案