摘要:
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); ... 阅读全文
摘要:
function formatViewNum(num){ if(parseInt(num) > 10000){ return parseFloat(num / 10000).toFixed(1)+"万"; }else if(parseInt(num) > 10000){ return parseFloat(num / 1000).toFixed(1... 阅读全文
摘要:
function padleft0(obj) { return obj.toString().replace(/^[0-9]{1}$/, "0" + obj); } 阅读全文
摘要:
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... 阅读全文
摘要:
function getnowtime() { var nowtime = new Date(); var year = nowtime.getFullYear(); var month = padleft0(nowtime.getMonth() + 1); var day = padleft0(nowtime.getDate()); ... 阅读全文