摘要: 简介 在jQuery1.5.0版本引入,为了实现Deferred对象,jQuery改写了ajax。是由jQuery.Deferred()方法创建的链式对象。 $.Deferred在jQuery代码自身四处被使用(promise、DOM ready、Ajax、Animation) 特性:使用... 阅读全文
posted @ 2014-05-23 18:45 wishyouhappy 阅读(1117) 评论(0) 推荐(0) 编辑
摘要: javascript的事件模型,采用"冒泡"模式,子元素的事件会逐级向上"冒泡",成为父元素的事件。在需要为较多的元素绑定事件时应该使用事件委托 event delegationjavascript事件传播html如下: 添加脚本:tar... 阅读全文
posted @ 2014-05-22 14:29 wishyouhappy 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 简介作用:customize jQuery,可以仅包含自己想要的模块jQuery Builder lets you easily build a custom version of jQuery that just includes the modules you need.使用方式一:在线方式:h... 阅读全文
posted @ 2014-05-22 10:18 wishyouhappy 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 绑定构造函数在子类构造函数中使用Fatherconstructor.apply(this, arguments)eg://父类function People(name,age){ this.name = name; this.age = age; this.species = "h... 阅读全文
posted @ 2014-05-21 17:06 wishyouhappy 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 浅拷贝浅拷贝函数:function copy(p){ var c = {}; for (var i in p){ c[i] = p[i]; } c.uber = p; return c;}测试:var People = { nation:'中国'};Pe... 阅读全文
posted @ 2014-05-21 16:50 wishyouhappy 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 每个javascript函数自动prototype属性,使用prototype可以为类声明通用的属性,当一个对象被创建时,构造函数将会把它的属性的prototype赋给对象的内部属性__proto__另外,javascript使用prototype实现继承机制创建通用属性不采用原型时:functio... 阅读全文
posted @ 2014-05-20 23:42 wishyouhappy 阅读(960) 评论(7) 推荐(1) 编辑
摘要: what is websocketsTwo-way communication over ont TCP socket, a type of PUSH technology HTML5的新特性,用于双向推送消息(例如网页聊天,手机推送消息等) 原理:client利用regular http请求w... 阅读全文
posted @ 2014-05-19 17:35 wishyouhappy 阅读(5633) 评论(0) 推荐(1) 编辑
摘要: 采用formatterYAHOO.widget.DataTable.Formatter.changeLight=function(elCell, oRecord, oColumn, oData){ elCell.innerHTML = "";};{key:"ONLINESTATUS", l... 阅读全文
posted @ 2014-05-19 14:22 wishyouhappy 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 使用render可以重新渲染datatable,之前添加的样式等信息也想相应会初始化,另外行定位等也会失效使用updateRows方法不会删除样式等信息更新datasource中_oData数据var records = myTable.getRecordSet().getRecords();var... 阅读全文
posted @ 2014-05-19 13:52 wishyouhappy 阅读(616) 评论(0) 推荐(0) 编辑
摘要: 相关函数getRecord :YAHOO.widget.Record getRecord ( row )For the given identifier, returns the associated Record instance.传入RecordSet position Index或者Recod... 阅读全文
posted @ 2014-05-19 10:31 wishyouhappy 阅读(350) 评论(0) 推荐(0) 编辑