js的API

js的API不算太多,不熟悉的分别百度之。讲究的是全局观,没事时候就过过,熟记于心。
1.全局对象
值属性:
NaN
Infinity
undefined

函数属性:
eval
parseInt
parseFloat
isNaN
isFinite

处理URI的函数属性:
decodeURI
decodeURIComponent
encodeURI
encodeURIComponent

构造器属性
Object
Function
Array
String
Boolean
Number
Date
RegExp
Error
EvalError
RangeError
ReferenceError
SyntaxError
TypeError
URIError

全局对象的其他属性:
Math
JSON

2.Object对象
构造器的属性:
Object.prototype
Object.getPrototypeOf()
Object.getOwnPropertyDescriptor()
Object.getOwnPropertyNames()
Object.create()
Object.defineProperty()
Object.defineProperties()
Object.seal()
Object.freeze()
Object.preventExtensions()
Object.isSealed()
Object.isFrozen()
Object.isExtensible()
Object.keys()

原型对象的属性:
Object.prototype.constructor
Object.prototype.toString()
Object.prototype.toLocaleString()
Object.prototype.valueOf()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()

3.Function对象
构造器的属性:
Function.prototype
Function.length

原型对象的属性:
Function.prototype.constructor
Function.prototype.toString()
Function.prototype.apply()
Function.prototype.call()
Function.prototype.bind()

实例的属性:
length
prototype

4.Array对象
构造器的属性:
Array.prototype
Array.isArray

原型对象的属性:
Array.prototype.constructor
Array.prototype.toString()
Array.prototype.toLocaleString()
Array.prototype.concat()
Array.prototype.join()
Array.prototype.pop()
Array.prototype.push()
Array.prototype.reverse()
Array.prototype.shift()
Array.prototype.slice()
Array.prototype.sort()
Array.prototype.splice()
Array.prototype.unshift()
Array.prototype.indexOf()
Array.prototype.lastIndexOf()
Array.prototype.every()
Array.prototype.some()
Array.prototype.forEach()
Array.prototype.map()
Array.prototype.filter()
Array.prototype.reduce()
Array.prototype.reduceRight()

实例属性:
length

5.String对象
构造器属性:
String.prototype
String.fromCharCode()

prototype属性:
String.prototype.constructor
String.prototype.toString()
String.prototype.valueOf()
String.prototype.charAt()
String.prototype.charCodeAt()
String.prototype.concat()
String.prototype.indexOf()
String.prototype.lastIndexOf()
String.prototype.localeCompare()
String.prototype.match()
String.prototype.replace()
String.prototype.search()
String.prototype.slice()
String.prototype.split()
String.prototype.substring()
String.prototype.toLowerCase()
String.prototype.toLocaleLowerCase()
String.prototype.toUpperCase()
String.prototype.toLocaleUpperCase()
String.prototype.trim()

实例属性:
length

6.Boolean对象
构造器的属性:
prototype

原型对象的属性:
Boolean.prototype.constructor
Boolean.prototype.toString()
Boolean.prototype.valueOf()

6.Number对象
构造器的属性:
prototype
MAX_VALUE
MIN_VALUE
NaN
NEGATIVE_INFINITY
POSITIVE_INFINITY

原型对象的属性:
Number.prototype.constructor
Number.prototype.toString()
Number.prototype.toLocaleString()
Number.prototype.valueOf()
Number.prototype.toFixed()
Number.prototype.toExponential()
Number.prototype.toPrecision()

7.Math对象
值属性:
E
LN10
LN2
LOG2E
LOG10E
PI
SQRT1_2
SQRT2

函数属性:
abs()
acos()
asin()
atan()
atan2()
ceil()
cos()
exp()
floor()
log()
max()
min()
pow()
random()
round()
sin()
sqrt()
tan()

8.Date对象
构造器属性:
Date.prototype
Date.parse()
Date.UTC()
Date.now()

原型对象的属性:
Date.prototype.constructor
Date.prototype.toString()
Date.prototype.toDateString()
Date.prototype.toTimeString()
Date.prototype.toLocaleString()
Date.prototype.toLocaleDateString()
Date.prototype.toLocaleTimeString()
Date.prototype.valueOf()
Date.prototype.getTime()
Date.prototype.getFullYear()
Date.prototype.getUTCFullYear()
Date.prototype.getMonth()
Date.prototype.getUTCMonth()
Date.prototype.getDate()
Date.prototype.getUTCDate()
Date.prototype.getDay()
Date.prototype.getUTCDay()
Date.prototype.getHours()
Date.prototype.getUTCHours()
Date.prototype.getMinutes()
Date.prototype.getUTCMinutes()
Date.prototype.getSeconds()
Date.prototype.getUTCSeconds()
Date.prototype.getMilliseconds()
Date.prototype.getUTCMilliseconds()
Date.prototype.getTimezoneOffset()
Date.prototype.setTime()
Date.prototype.setFullYear()
Date.prototype.setUTCFullYear()
Date.prototype.setMonth()
Date.prototype.setUTCMonth()
Date.prototype.setDate()
Date.prototype.setUTCDate()
Date.prototype.setHours()
Date.prototype.setUTCHours()
Date.prototype.setMinutes()
Date.prototype.setUTCMinutes()
Date.prototype.setSeconds()
Date.prototype.setUTCSeconds()
Date.prototype.setMilliseconds()
Date.prototype.setUTCMilliseconds()
Date.prototype.toUTCString()
Date.prototype.toISOString()
Date.prototype.toJSON()

9.RegExp对象
构造器的属性:
RegExp.prototype

原型对象的属性:
RegExp.prototype.exec()
RegExp.prototype.test()
RegExp.prototype.toString()

实例属性:
source
global
ignoreCase
multiline
lastIndex

10.Erorr对象
构造器属性:
Error.prototype

原型对象的属性:
Error.prototype.constructor
Error.prototype.name
Error.prototype.message
Error.prototype.toString()

11.JSON对象
parse()
stringify()

posted @ 2018-01-10 22:58  journeyIT  阅读(16)  评论(0编辑  收藏  举报