JavaScript中方法的基模式

Number类型ToString方法的基模式:

var iNum = 10;
alert(iNum.toString(
2));  //output 1010
alert(iNum.toString(8));  //output 12
alert(iNum.toString(16)); //output a

parseInt方法的基模式:

var iNum1 = parseInt("a"16);  //output 10
原文地址:https://www.cnblogs.com/icebutterfly/p/1524211.html