<分区>
Possible Duplicate:
How to convert decimal to hex in JavaScript?
在 Javascript 中是否有等同于 python 的 int('hex-string', 16) 函数?
标签 javascript python hex
<分区>
Possible Duplicate:
How to convert decimal to hex in JavaScript?
在 Javascript 中是否有等同于 python 的 int('hex-string', 16) 函数?
最佳答案
您可以使用 parseInt() :
var result = parseInt("0x42", 16); // 66
关于javascript - 相当于 Python 的 int ('hex-string' , 16) 在 Javascript 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7932210/