摘要: body{_background: url(about:blank) fixed;} 阅读全文
posted @ 2012-05-02 16:32 小猩猩君 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 1 //寄生组合式继承 2 function object(o) { 3 function F() {} 4 F.prototype = o; 5 return new F(); 6 } 7 8 function inheritPrototype(subType, superType) { 9 var prototype = object(superType.prototype);10 prototype.constructor = subType;11 subType.prototype = prototype;12 }13 14 func... 阅读全文
posted @ 2012-04-30 11:36 小猩猩君 阅读(718) 评论(0) 推荐(0) 编辑
摘要: 1 //组合继承是Javascript最常用的继承模式 2 function SuperType(name) { 3 this.name = name; 4 this.colors = ["red", "blue", "green"]; 5 } 6 7 SuperType.prototype.sayName = function() { 8 console.log(this.name); 9 };10 11 function SubType(name, age) {12 //继承属性13 SuperType.call(this, na 阅读全文
posted @ 2012-04-30 11:35 小猩猩君 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1functionSuperType(){2this.property=true;3}45SuperType.prototype.getSuperValue=function(){6returnthis.property;7};89functionSubType(){10this.subproperty=false;11}1213//继承了SuperType14SubType.prototype=newSuperType();1516SubType.prototype.getSuperValue=function(){17returnthis.subproperty;18};1920varin 阅读全文
posted @ 2012-04-26 09:25 小猩猩君 阅读(252) 评论(0) 推荐(0) 编辑
摘要: /Files/qzsonline/YUI_Compressor.rar文件夹内的yuicompressor.jar 请更新为最新的版本 阅读全文
posted @ 2012-04-19 10:37 小猩猩君 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 官方网站:http://www.sublimetext.com/插件安装一、输入当中的代码:http://wbond.net/sublime_packages/package_control/installation1、BracketHighlighter2、GBK Encoding Support3、jquery4、js Format5、yui compressor6、zenCoding7、SideBarEnhancements 阅读全文
posted @ 2012-04-18 21:54 小猩猩君 阅读(889) 评论(0) 推荐(0) 编辑
摘要: 按对象取值:jQuery代码如下 1 (function ($) { 2 $.getJSON('ajax/test.json', function (data) { 3 var items = []; 4 5 $.each(data.comments, function (key, val) { 6 items.push('<li class="' + 'tag' + val.class + '">' + '<a href="#">' + val.co 阅读全文
posted @ 2012-04-17 16:21 小猩猩君 阅读(11572) 评论(0) 推荐(0) 编辑
摘要: 1、简单跨域(子域):domian2、跨大域:postMessage 阅读全文
posted @ 2012-03-29 10:52 小猩猩君 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1functionPerson(){2}34Person.prototype.name="Nicholas";5Person.prototype.age=29;6Person.prototype.job="SoftwareEngineer";7Person.prototype.sayName=function(){8console.log(this.name);9};1011varperson1=newPerson();12person1.sayName();1314varperson2=newPerson();15person2.sayName();1 阅读全文
posted @ 2012-03-26 15:31 小猩猩君 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 最近一个私活,客户要求有光源特效,本来想用Flash画的,可是看了jQuery动画(jQuery 1.4 Animation Techniques Beginner's Guide)以后觉得可以试试GitHub链接:https://github.com/qianzs/sun_scroll欢迎指点 阅读全文
posted @ 2012-03-17 19:46 小猩猩君 阅读(317) 评论(0) 推荐(0) 编辑