随笔分类 - 权威指南
摘要:var string = "helLo,world"; string.charAt(0); //指定位置的字符(h) string.charAt(string.length-1); //最后一个字符 string.charCodeAt(0); //第一个字符的 Unicode 编码(h是114) s...
阅读全文
摘要:/** 全局函数* @encodeURI(); //编码的 URI* @decodeURI(); //对encodeURI()编码的URL 进行解码* @encodeURIComponent() //字符串作为 URI 组件进行编码* @decodeURIComponent() //函数可对 enc
阅读全文
摘要:// 属性 Math.E //自然对数的底数(2.718281828459045) Math.PI //圆周率(3.141592653589793) Math.LN2 //2的自然对数(0.6931471805599453) Math.LN10 //10的自然对数(2.30...
阅读全文
摘要:参考 几种设置将来时间的方式 时间计算 function getTimeRemaining(){ var time = new Date(), // 获取时间(2016-8-8 21.00) startTime = time.getTime(), // 转换毫秒数 endTime = Date.UT
阅读全文