VaR A = '20140901 ';
Alert (parseint (A, 2); // convert 111 as a binary value. Ignore 60 (not binary) and convert from left to right only binary values.
Alert (parseint (A, 16); // convert all
According to this method, it can be converted to any hexadecimal
VaR A = '20140901 ';
Alert (parseint (A, 10). tostring (16); // convert a to a in hexadecimal notation, and then convert it to hexadecimal notation. It can also be other hexadecimal notation.
The following describes the ASCII code:
Function Test (){
VaR A = 'AB ';
VaR c = A. charcodeat (1); // return 98, that is, B's ASCII code starting from 0.
VaR char = string. fromcharcode (98); returns lowercase B
}
// Small example
Function Test () {// output characters in the ASCII code Extension Set
VaR c = "";
For (VAR I = 1; I <65536; I ++ ){
If (I % 10) = 0 ){
C + = I + ': \ t' + String. fromcharcode (I) +' \ t' + '\ n';} else {
C + = I + ': \ t' + String. fromcharcode (I) +' \ T ';}
}
Document. getelementbyid ("ABC"). innertext = C;
}
<Div id = 'abc'> </div>