2012年8月2日
摘要: 说组Array扩展是否包含元素属性://扩展函数(是否包含某元素)Array.prototype.contains=function(e){for(i=0;i<this.length;i++){if(this[i]==e)returntrue;}returnfalse;}/*用法:var temp = [1,2,3,4,5];var status = temp.contains(1);*/日期格式化:Date.prototype.formate = function(fmt){varo={"M+":this.getMonth()+1,//月份"d+" 阅读全文
posted @ 2012-08-02 14:31 一路前行 阅读(402) 评论(0) 推荐(0) 编辑