摘要: Ajax会触发很多事件。有两种事件,一种是局部事件,一种是全局事件:局部事件:通过$.ajax来调用并且分配。 $.ajax({ beforeSend: function(){ // Handle the beforeSend event }, complete: function(){ // Handle the complete event } // ... });全局事件,可以用bind来绑定,用unbind来取消绑定。这个跟click/mousedown/keyup等事件类似。但他可以传递到每一个DOM元素上... 阅读全文
posted @ 2013-12-16 22:08 午时的海 阅读(14456) 评论(0) 推荐(0) 编辑
摘要: 今天看到javascript对象name : name,这样的表示方法,突然发现跟PHP的对象不一样,public、protected、private、 static、 const 所以今天又学了一招.方便学习js类的朋友,让你快速的掌握js类的定义方法,方法有很多种,结果都一样。大家可以根据自己的爱好选用。贴个代码先:function O(user,pwd){ //use constructorthis.user=user;this.pwd=pwd;this.get=get;return this;}function O2(user,pwd){ //use factoryvar obj=ne 阅读全文
posted @ 2013-12-16 21:55 午时的海 阅读(248) 评论(0) 推荐(0) 编辑