2016年6月7日

摘要: 所谓观察者模式运用:当对象属性改变是,同时通知多个页面的进行更改。 阅读全文
posted @ 2016-06-07 16:19 I'm new 阅读(134) 评论(0) 推荐(0) 编辑
 
摘要: 1.function 作为类时,首字母大写 2.function 作为方法,第二个单词首字母大写。 3.js最好用单引号。 阅读全文
posted @ 2016-06-07 12:29 I'm new 阅读(98) 评论(0) 推荐(0) 编辑
 
摘要: 阅读全文
posted @ 2016-06-07 11:49 I'm new 阅读(198) 评论(0) 推荐(0) 编辑
 

2016年6月5日

摘要: 阅读全文
posted @ 2016-06-05 12:54 I'm new 阅读(161) 评论(0) 推荐(0) 编辑
 
摘要: 1.每个对象都有一个constructor,都指向创建该对象的方法。 2.function对象的prototype的constructor也是指向该方法。如果对prototype进行重写,constructor将消失,但可以 显性添加constructor指向其函数对象。 参考:http://blo 阅读全文
posted @ 2016-06-05 10:00 I'm new 阅读(207) 评论(0) 推荐(0) 编辑
 
摘要: 1.创建特定类型的对象 2.js开发尽量用单引号 阅读全文
posted @ 2016-06-05 08:48 I'm new 阅读(117) 评论(0) 推荐(0) 编辑
 

2016年6月4日

摘要: 按钮a 按钮b 阅读全文
posted @ 2016-06-04 19:49 I'm new 阅读(143) 评论(0) 推荐(0) 编辑
 
摘要: 圣经书:JavaScript 高级程序设计 设计模式:DesignPatterns by Erich Gamma、Richard Hlem、Ralph Johnson 、Jhon Vlissides 设计原则:想像类的构造 1、开闭原则,继承父类 重写方法,不修改方法。 2、里氏转换原则,继承父类, 阅读全文
posted @ 2016-06-04 11:56 I'm new 阅读(779) 评论(0) 推荐(0) 编辑
 
摘要: 1、正则表达式主要用于匹配字符串,拥有内置String对象的一些常用方法。但我觉得用正则表达式应该去匹配一些字符串的组合,如电话号码,邮箱等,当然查找和替换还是有用的,因为他可以全局替换嘛。 这里附上两个学习网址:一个有帮助文档,如语法,另一个是正则分析工具: http://www1.w3cfuns 阅读全文
posted @ 2016-06-04 09:37 I'm new 阅读(124) 评论(0) 推荐(0) 编辑
 

2016年6月3日

摘要: 阅读全文
posted @ 2016-06-03 19:44 I'm new 阅读(305) 评论(0) 推荐(0) 编辑