上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 23 下一页
摘要: var arr1 = [1, 2, 3, 4, 5];var arr2 = [1, 2, 3, 4, 5];function equalArrays(a, b) { if (a.length != b.length) { alert("错啦,数组长度不相等!" ); return} el... 阅读全文
posted @ 2015-06-02 21:14 Coca-code 阅读(158) 评论(0) 推荐(0)
摘要: 1. 使用unicode编码2. javascript有:函数类(Function)、数组类(Array)、错误类(Error)、正则类(RegExp)、日期类(Date)3. 显示系统时间的一段代码:var t = new Date();var t1 =t.getFullYear() +"年" +... 阅读全文
posted @ 2015-06-02 16:41 Coca-code 阅读(160) 评论(0) 推荐(0)
摘要: //JavaScript完美甘露模型代码 function Class() { var aDefine = arguments[arguments.length-1]; if(!aDefine) return; //解析基类 var aBase = arguments.length > 1?arguments[0]:object; //临时函数,用于挂接原型链 function prototy... 阅读全文
posted @ 2015-06-01 15:26 Coca-code 阅读(248) 评论(0) 推荐(0)
摘要: var object = { isA : function(aType) { var self = this; while(self){ if(self == aType) return true; self = self.Type; }; ... 阅读全文
posted @ 2015-06-01 10:34 Coca-code 阅读(244) 评论(0) 推荐(0)
摘要: function New(oClass,oParams) { function new_(){ oClass.Create.apply(this,oParams); }; new_.prototype = aClass; return new new_();};=====... 阅读全文
posted @ 2015-06-01 10:11 Coca-code 阅读(131) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2015-05-29 17:06 Coca-code 阅读(165) 评论(0) 推荐(0)
摘要: 一.EJS在这里专指WEB所使用的模板引擎之一,是一个JavaScript模板库,用来从JSON数据中生成HTML字符串。二.因为用它能更好得组织HTML代码,易于维护。三. 1.安装 npm install ejs 2.可以在 安排Js代码。 3. 4. 阅读全文
posted @ 2015-05-15 01:14 Coca-code 阅读(119) 评论(0) 推荐(0)
摘要: :not(selector)某个元素下不选某个元素 阅读全文
posted @ 2015-05-12 09:38 Coca-code 阅读(103) 评论(0) 推荐(0)
摘要: radio只能选一个只要name相同 阅读全文
posted @ 2015-05-12 09:06 Coca-code 阅读(157) 评论(0) 推荐(0)
摘要: 1. 定义Events = function() {var listen, log, obj, one, remove, trigger, __this;obj = {};__this = this;listen = function( key, eventfn ) { //把简历扔盒子, key就... 阅读全文
posted @ 2015-05-09 21:54 Coca-code 阅读(153) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 23 下一页