惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
博客园 - 司徒正美
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
D
Docker
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
I
InfoQ
雷峰网
雷峰网
The Cloudflare Blog
美团技术团队
Engineering at Meta
Engineering at Meta

博客园 - taodesign

一个自定义分享按钮 解决windows下nginx中文文件名乱码 sublime text 3 添加 javascript 代码片段 ( snippet ) transition动画最简使用方式 hammerjs jquery的选项使用方法,以给swipe设置threshold和velocity为例 sublime text 3 的emmet 添加自定义 html 片段 解决 placeholder 垂直不居中,偏上的问题 Sublime Text 3 配置 sass 解决phpwind 9 转换到 discuz x 3.1的头像仍然不显示问题 sina微博登录框和twitter的比较 PHP初学者必看 不用qq的这一个月 虽然qq的第二封信些的相当中肯,但是—— 从现在起,试着不用qq一个月,看看什么情况 百度兵陷日本,Google 90% Baidu 1% wordpress 侧栏微博插件 Miniposts blogger导入到blogbus非常顺利 ie8 的断字/断行 bug dede vs 帝国
javascript 进制转换(2进制、8进制、10进制、16进制之间的转换)
taodesign · 2014-03-11 · via 博客园 - taodesign

//十进制转其他  
var x=110;  
alert(x);  
alert(x.toString(8));  
alert(x.toString(32));  
alert(x.toString(16));  
//其他转十进制  
var x='110';  
alert(parseInt(x,2));  
alert(parseInt(x,8));  
alert(parseInt(x,16));  
//其他转其他  
//
先用parseInt转成十进制再用toString转到目标进制  
alert(String.fromCharCode(parseInt(141,8)))  
alert(parseInt('ff',16).toString(2));

posted @ 2014-03-11 14:18  taodesign  阅读(220)  评论(0)    收藏  举报