02 2016 档案
摘要:$scope.roleModel = {}; //循环遍历角色对象 for(var selectRole in $scope.roleModel){ if($scope.roleModel[selectRole] == true){ roles.push({"name":selectRole});
阅读全文
摘要:Array.prototype.unique = function() { var n = {},r=[]; //n为hash表,r为临时数组 for(var i = 0; i < this.length; i++) //遍历当前数组 { if (!n[this[i]]) //如果hash表中没有当
阅读全文
摘要://构造数组元素删除 Array.prototype.indexOf = function (val) { for (var i = 0; i < this.length; i++) { if (this[i].id == val) return i; } return -1; }; Array.p
阅读全文
摘要:今天写代码发现 viewValue = "2014-04-04 23:33:34" f = new Date(viewValue).getTime(); 在谷歌上可以正确解析,而在ie与edge上缺解析不了,经查询是兼容性问题,只要把"-"替换为"/"就可以解决,如下 f = new Date(Da
阅读全文

浙公网安备 33010602011771号