B站篇p24-26
内置对象
Arguments | 只在函数内部定义,保存了函数的实参 |
Array | 数组对象 |
Date | 日期对象 得到年月日时分秒 var mstr=date.getMinutes()<10? "0"+date.getMinutes() : date.getMinutes() |
Math 数字对象 | 随机数:console.log(Math.random()) 向上取整数:console.log(Math.ceil(1.2)) 向下取整数:console.log(Math.floor(1.2)) |
string 字符串对象 | var str = "Hello World" console.log(str) console.log(str.substring(3)) console.log(str.substring(3,5)) |
获取对象 | 获取对象 设置属性 |
序列化和反序列化 | 对象转成字符串 字符串转成对象 |
this | 1、直接调用 function test(){ 2、调用对象中函数 var o ={ |
事件
事件构成 | 1、事件源 2、事件名 3、事件监听 4、执行函数 |