上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页
摘要: function toThousands(num) { var num = (num || 0).toString(), result = ''; while (num.length > 3) { result = ',' + num.slice(-3) + result; num = num.slice(0, num.length - 3); ... 阅读全文
posted @ 2018-01-02 10:51 邹柯 阅读(151) 评论(0) 推荐(0) 编辑
摘要: function formatViewNum(num){ if(parseInt(num) > 10000){ return parseFloat(num / 10000).toFixed(1)+"万"; }else if(parseInt(num) > 10000){ return parseFloat(num / 1000).toFixed(1... 阅读全文
posted @ 2018-01-02 10:50 邹柯 阅读(1339) 评论(0) 推荐(0) 编辑
摘要: function padleft0(obj) { return obj.toString().replace(/^[0-9]{1}$/, "0" + obj); } 阅读全文
posted @ 2018-01-02 10:46 邹柯 阅读(187) 评论(0) 推荐(0) 编辑
摘要: function setCookie(name, value, ms){ var oDate=new Date(); oDate = new Date(oDate.getTime()+ms*1000); document.cookie=name+'='+encodeURIComponent(value)+';expires='+oDate; } function getC... 阅读全文
posted @ 2018-01-02 10:45 邹柯 阅读(101) 评论(0) 推荐(0) 编辑
摘要: function getnowtime() { var nowtime = new Date(); var year = nowtime.getFullYear(); var month = padleft0(nowtime.getMonth() + 1); var day = padleft0(nowtime.getDate()); ... 阅读全文
posted @ 2018-01-02 10:45 邹柯 阅读(602) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 36 下一页