面向对象
面向对象的特征:主要可以概括为封装性,继承性和多态性
自定义对象
-
对象的定义
-
访问对象成员
-
对象成员便利
-
深拷贝与浅拷贝
构造函数 -
JS内置的构造函数
-
自定义构造函数
-
私有成员
-
函数中的this 指向
1.分析this指向
2.更改this指向
内置对象
1.String对象
-
length
-
charAt(index)
-
indexOf(searchValue)
-
lastIndexOf(searchValue)
-
substring(start[,end])
-
substr(start[,length])
-
toLowerCase()
-
toUpperCase()
-
split([separator[,limit])
-
replace(str1,str2)
2.Number对象 -
MAX_VALUE
-
MIN_VALUE
-
toFixed(digits)
3.Math对象 -
PI
-
abs(x)
-
max([value1[,value2,…]])
-
min([value1[,value2,…]])
-
pow(base,exponent)
-
sqrt(x)
-
ceil(x)
-
floor(x)
-
round(x)
-
random()
4.Date对象 -
getFullYear()
-
setFullYear(value)
-
getMonth()
-
setMonth(value)
-
getDate()
-
setDate(value)
-
getDay()
-
getHours()
-
setHours(value)
-
getMinutes()
-
setMinutes(value)
-
getSeconds()
-
setSeconds(value)
-
getMilliseconds()
-
setMilliseconds(value)
-
getTime()
-
getTime(value)