摘要:
body{_background: url(about:blank) fixed;} 阅读全文
摘要:
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... 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
/Files/qzsonline/YUI_Compressor.rar文件夹内的yuicompressor.jar 请更新为最新的版本 阅读全文
摘要:
官方网站:http://www.sublimetext.com/插件安装一、输入当中的代码:http://wbond.net/sublime_packages/package_control/installation1、BracketHighlighter2、GBK Encoding Support3、jquery4、js Format5、yui compressor6、zenCoding7、SideBarEnhancements 阅读全文
摘要:
按对象取值: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 阅读全文
摘要:
1、简单跨域(子域):domian2、跨大域:postMessage 阅读全文
摘要:
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 阅读全文
摘要:
最近一个私活,客户要求有光源特效,本来想用Flash画的,可是看了jQuery动画(jQuery 1.4 Animation Techniques Beginner's Guide)以后觉得可以试试GitHub链接:https://github.com/qianzs/sun_scroll欢迎指点 阅读全文