-
-
Save NKid/06dd00806e27a9a0e54c to your computer and use it in GitHub Desktop.
[十進位/十六進位互轉] Hex and Decimal Convert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var numSys = { | |
d2h : function(d) {return d.toString(16);}, | |
h2d : function(h) {return parseInt(h,16);} | |
} | |
numSys.d2h(255); //FF | |
numSys.h2d('FF'); //255 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment