日期:2014-05-16 浏览次数:20343 次
// Array Remove - By John Resig (MIT Licensed) Array.prototype.remove = function (from, to) { var rest = this.slice((to || from) + 1 || this.length); this.length = from < 0 ? this.length + from : from; return this.push.apply(this, rest); };
function getNow() { var date = new Date(); return date.getFullYear() + "-" + (parseInt(date.getMonth()) + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); }
function formater(date) { return date.getFullYear() + "-" + (parseInt(date.getMonth()) + 1) + "-" + date.getDate(); }
function isJson(obj) { return typeof(obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; }