js基础
- js输出
- window.alert()
- document.write()
- innerHTML
- console.log()
- window.alert()
- js变量
- 声明变量
- 变量类型
- 基本数据类型
- Number——数字(NaN)
- isNaN——判断是否非数值
- isNaN——判断是否非数值
- String——字符串
- toString(将其他转为string,null,undefined)
- toString(将其他转为string,null,undefined)
- Boolean——布尔值(true或者false)
- null——不存在
- undefined——空
- Number——数字(NaN)
- 复杂数据类型
- Object
- function
- Array
- Date
- function
- Object
- 基本数据类型
- 声明
- var
- let
- var
- 变量类型
- 变量赋值(=)
- var obj = '';
- var obj = '';
- 方法(function)
- var clickBtn = function(){}
- function click(){}
- var clickBtn = function(){}
- 判断
- 通用的方法
- typeof:判断基本数据类型
- typeof:判断基本数据类型
- 复杂数据类型
- 数组
- instanceof
- 对象的constructor
- Array.isArray()
- instanceof
- 通用的方法
- 声明变量
- js运算符
- 算数运算符
- +,-,*,/,%,++,--,**(平方)
- +,-,*,/,%,++,--,**(平方)
- 赋值运算符
- =,+=,-=,*=,/=,%=
- =,+=,-=,*=,/=,%=
- 比较运算符
- ==,===,!=,!==,<,>,<=,>=,?
- ==,===,!=,!==,<,>,<=,>=,?
- 逻辑运算符
- &&,||,!
- &&,||,!
- 算数运算符
- js事件
- onclick,onmouseover,onmouseout,onkeydown,onkeyup,onchange
- onclick,onmouseover,onmouseout,onkeydown,onkeyup,onchange
- 数据的方法
- 字符串方法
- length,indexOf,lastIndexOf,search,slice,substring,substr,replace,toLowerCase,toUpperCase,concat,trim,charAt,charCodeAt,split
- length,indexOf,lastIndexOf,search,slice,substring,substr,replace,toLowerCase,toUpperCase,concat,trim,charAt,charCodeAt,split
- 数字方法
- Number,parseFloat,parseInt,
- Math.PI,
- Math.round,Math.floor,Math.ceil,
- Math.pow,Math.sqrt,
- Math.abs,
- Math.max,Math.min,
- Math.random
- Number,parseFloat,parseInt,
- 数组方法
- join,pop,push,shift,unshift,
- splice,concat,slice,sort,reverse,
- Math.max.apply,Math.min.apply
- foreach,map,filter,reduce,every,some,indexOf,find,findIndex
- join,pop,push,shift,unshift,
- 日期
- 创建日期
- new Date()
- new Date()
- 方法
- getFullYear,
- getMonth,
- getDate,
- getHours,
- getMinutes,
- getSeconds,
- getDay,
- getFullYear,
- 创建日期
- 字符串方法
- 计时器
- onkeydown
- window.onload = function(){]

浙公网安备 33010602011771号