摘要:
1. 构造函数原型对象:prototype ① 构造函数独立创建对象,消耗性能 function Person(name) { this.name = name; this.sayHello = function () { console.log("Hello,my name is " + this 阅读全文
posted @ 2017-02-24 16:57
Tabb.Coding
阅读(605)
评论(0)
推荐(0)
摘要:
① window对象(Math方法也属于window对象): window对象是JavaScript中的顶级对象,所有定义在全局作用域中的变量、函数都会变成window对象的属性和方法,window对象下的属性和方法调用的时候可以省略window 例如:window.alert(); window. 阅读全文
posted @ 2017-02-24 00:51
Tabb.Coding
阅读(328)
评论(0)
推荐(0)
摘要:
①文本对象document: 例如:document.getElementById() 只获取一个对象 document.getElementsByTagName() 获取对象伪数组 document.getElementsByClassName() 获取对象伪数组,存在兼容问题 document. 阅读全文
posted @ 2017-02-24 00:17
Tabb.Coding
阅读(421)
评论(0)
推荐(1)
浙公网安备 33010602011771号