How can I assign the code below to a number?
Integer.toHexString (myHexValue);
The second optional argument to parseInt is radix.
parseInt("0xff", 16); // yields 255
Convert it back to integer ...
var s = "FFFFFF"; var n = parseInt("0x"+ s);
You can specify the hexadecimal value as "Number". For instance:
foo = Number(0xDEADBEEF)
Hope it helps.