I hava a time string,the format is HHMM, I need to get the decimal of it, how can I do ?
e.g.
'1221'=1221
'0101'=101
'0011'=11
'0001'=1
If the string begins with "0x", the radix is 16 (hexadecimal)
If the string begins with "0", the radix is 8 (octal).
But I want to treat it as decimal no matter whether started with 0 or 00 or 000.
additional:
thanks all.
I had know what you said, what make I confused as following :
var temp1=0300; var temp2='0300';
parseInt(temp1,10)=192; parseInt(temp1,10)=300;
so I I doubt parseInt() and have this question .