摘要: DOM:Document/Object/Model DOM是一棵树,树上有Node,分为Document(html)、Element(元素)、Text(文本)、Comment(注释)及其他 DOM最主要的功能是:通过 构造函数 把 节点 变成 对象,通过调用对象的 API 来操作对象 Node的接口 阅读全文
posted @ 2020-07-28 04:48 ScottRhee 阅读(160) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="zh-Hans"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Docu 阅读全文
posted @ 2020-07-23 06:46 ScottRhee 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 7 种数据类型分为简单和复杂两种 简单数据类型: number, string, boolean, null, undefined, symbol 简单数据类型存储方式:直接存放在Stack(栈)里 注意:string可以存在栈也可存在堆 复杂数据类型:object(包括array和function 阅读全文
posted @ 2020-07-22 01:51 ScottRhee 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 关于函数name属性,不同声明方式有所差异,没有规律只能硬记 阅读全文
posted @ 2020-07-21 21:05 ScottRhee 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 我们在声明一个变量 var a = 1 实际分为两步 var a //先声明一个变量a a = 1 // 给a赋值 1. 具名函数 格式: function 函数名(input1,input2){ return //(返回结果) } 列如 function sum(a , b){ return a 阅读全文
posted @ 2020-07-21 19:13 ScottRhee 阅读(1299) 评论(0) 推荐(0) 编辑
摘要: 1. number, string, boolean(声明方式加不加new的区别) var a = number( 1 ) 返回数字 1 var b = string( false ) 返回字符串 'false' var c = boolean( 1) 返回布尔值 true (5个false值: 0 阅读全文
posted @ 2020-07-21 06:20 ScottRhee 阅读(157) 评论(0) 推荐(0) 编辑
摘要: setTimeout(一次) setInterval(定时一次) HTML: <!DOCTYPE html> <html> <head> <meta chartset="utf-8"> <title></title> <link rel ="stylesheet" href= "./style.cs 阅读全文
posted @ 2020-07-20 13:21 ScottRhee 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 用JS制作导航显示子菜单(鼠标进入的时候,我们要a标签显示它的兄弟元素 ) HTML: <nav> <ul> <li><a href="#">关于</a></li> <li><a href="#">技能</a></li> <li> <a class="menutrigger" href="#">作品 阅读全文
posted @ 2020-07-16 18:17 ScottRhee 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 基本数据类型(7种) number 1,2,3...... string '你好', 'hello', "helleo" boolean false/ true null undefined symbol object arr/fuction 标识符 : 所有用户自定义的名字叫做标识符 1.不能以数 阅读全文
posted @ 2020-07-14 07:00 ScottRhee 阅读(199) 评论(0) 推荐(0) 编辑
摘要: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 阅读全文
posted @ 2020-07-14 06:40 ScottRhee 阅读(195) 评论(0) 推荐(0) 编辑