上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: Node.js is a JavaScript runtime built onChrome's V8 JavaScript engine.Node.js uses an event-driven, non-blocking I/O model that makes it lightweight ... 阅读全文
posted @ 2016-01-11 22:24 圣耀 阅读(2464) 评论(0) 推荐(0) 编辑
摘要: <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->1、jQuery.each(object, [callback]) 用于例遍任何对象。回调函数拥有两个参数:第一个为对象的成员或数组的索引,第二个为对应变量或内容。如果需要退出 ea 阅读全文
posted @ 2016-01-11 18:03 圣耀 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 函数可以实现类var aQuery = function(selector, context) { //构造函数}aQuery.prototype = { //原型 name:function(){}, age:function(){}}var a = new aQ... 阅读全文
posted @ 2016-01-11 15:59 圣耀 阅读(327) 评论(0) 推荐(0) 编辑
摘要: //工厂模式function createObject(name,age){ var obj = new Object(); obj.name = name; obj.age = age; obj.fun = function(){ return this.na... 阅读全文
posted @ 2016-01-11 15:02 圣耀 阅读(1614) 评论(0) 推荐(0) 编辑
摘要: 一、ECMAScript中描述了原型链的概念。我们知道ECMAScript并不像C++,Java那样使用类,但是对象仍然可以通过多种方式创建,其中就有构造函数方式。每个构造函数都有一个原型对象,同时都有一个prototype属性, prototype属性指向构造函数的原型对象,它被用来实现基于原型的... 阅读全文
posted @ 2016-01-11 14:17 圣耀 阅读(224) 评论(0) 推荐(0) 编辑
摘要: //构造函数 //使自己的对象多次复制,同时实例根据设置的访问等级可以访问其内部的属性和方法 //当对象被实例化后,构造函数会立即执行它所包含的任何代码 function myObject(msg){ //特权属性(公有属性) this.myMsg = msg; //只在被实例化后的... 阅读全文
posted @ 2016-01-07 21:24 圣耀 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 进入"严格模式"的标志"use strict";老版本的浏览器会把它当作一行普通字符串,加以忽略。消除Javascript语法的一些不合理、不严谨之处,减少一些怪异行为;消除代码运行的一些不安全之处,保证代码运行的安全;提高编译器效率,增加运行速度;为未来新版本的Javascript做好铺垫;同样的... 阅读全文
posted @ 2016-01-06 17:08 圣耀 阅读(772) 评论(0) 推荐(0) 编辑
摘要: $(selector).bind(event,data,function)$(selector).live(event,data,function)//jquery1.9版本以下支持,jquery1.9及其以上版本删除了此方法,jquery1.9以上版本用on()方法来代替$(selector).d... 阅读全文
posted @ 2016-01-06 15:14 圣耀 阅读(13128) 评论(1) 推荐(2) 编辑
摘要: 1)$("selector").map(callback(index,domElement)); //.map()方法 用于将当前匹配元素集合中的每一个元素传入回调函数(callback)中,并返回一个新的jQuery对象,也就相当于通过该方法重组匹配集合内容。其中index是元素索引,domEl... 阅读全文
posted @ 2016-01-05 21:06 圣耀 阅读(2256) 评论(0) 推荐(0) 编辑
摘要: 1、why is jqueryOnly 32kB minified and gzipped. Can also be included as an AMD moduleSupports CSS3 selectors to find elements as well as in style prope... 阅读全文
posted @ 2016-01-04 21:55 圣耀 阅读(202) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页