怎么把数字格式化为16进制并把值存起来? 怎么把数字格式化为16进制并把值存起来?var a = 10;document.write(a.toString(16));我只会打印 但是这样存又不对 var num=a.toString(16);请教怎么存啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script>var a = 10;var num=a.toString(16);alert(num)</script>怎么说是不对的呢?你的真实目的是干什么? 为什么不对?var a = 10;var num = a.toString(16);document.write(num);不一样的结果嘛。 <script>tmpDate = new Date();date = tmpDate.getDate();month= tmpDate.getMonth() + 1 ;year= tmpDate.getYear();second = tmpDate.getSeconds();minute = tmpDate.getMinutes();hour = tmpDate.getHours();var time = (year-1970) * 365 * 24 * 3600 + month * 30 * 24 * 3600+ day * 24 * 3600 + hour * 3600 + minute * 60 + second;var num = time.toString(16);alert(num);</script> vml问题 广告不动,不能执行Jquery代码。什么原因? 请教javascript高手 关于弹出div的位置判断问题~!50分 JS正则表达式 document.getElementById为空或不是对象 台胞证 正则验证 怎样让一个文本框的内容在被点击 或者 获得焦点后 内容全选高亮显示或直接消失 请教一个JS判断函数 高分请教,怎么判断某个窗口是否存在 这个正则怎么写?试了半天无果 两个数值的比较,出现问题,请指教
var a = 10;
var num=a.toString(16);
alert(num)
</script>怎么说是不对的呢?你的真实目的是干什么?
var a = 10;
var num = a.toString(16);
document.write(num);
不一样的结果嘛。
tmpDate = new Date();
date = tmpDate.getDate();
month= tmpDate.getMonth() + 1 ;
year= tmpDate.getYear();
second = tmpDate.getSeconds();
minute = tmpDate.getMinutes();
hour = tmpDate.getHours();
var time = (year-1970) * 365 * 24 * 3600 + month * 30 * 24 * 3600+ day * 24 * 3600 + hour * 3600 + minute * 60 + second;
var num = time.toString(16);
alert(num);
</script>