购物车 tr表示行 td表示列 th可以加粗显示 商品名称 单价 数量 小计 iphone ¥5999 + 1 - ¥5999 iphon...
![240](https://cdn2.jianshu.io/assets/default_avatar/9-cceda3cf5072bcdd77e8ca4f21c40998.jpg?imageMogr2/auto-orient/strip|imageView2/1/w/240/h/240)
购物车 tr表示行 td表示列 th可以加粗显示 商品名称 单价 数量 小计 iphone ¥5999 + 1 - ¥5999 iphon...
万年历 *{margin:0;padding:0;}li{list-style: none;}a{text-decoration: none;} 1 春节 2 二月...
一、构造函数 说构造函数的概念之前我们应该先了解类的概念,类与对象的概念息息相关,我们在讲对象的概念的时候说过,一只猫是一个对象,一个人是一个对象,一章桌子也是一个对象,那么...
导航条变色 *{margin:0;padding:0;box-sizing: border-box;}li{list-style: none;}a{text-decorati...
事件捕获 *{margin:0;padding:0;} div1{ } div2{ } div3{ } var div1=document.getElementById('d...
一、函数声明与表达式 1.函数声明 function fn(){console.log('hello world');}fn(); fn();function fn(){co...
事件流 1.绑定事件 想要给一个元素绑定事件,我们有两种方法:使用内联事件或事件监听器。在之前的课程中,我们一直使用的是内联事件来为元素绑定事件 按钮1 按钮2 var ...
一、计时器 css样式 停止一次性定时器 停止永久性定时器 script 一次性定时器 var btn1=document.querySelector('.btn1');v...
放学倒计时 function task(){var now=new Date();var end=new Date('2018/5/25 18:00');var s=(end...
图片切换案例 *{margin:0;padding:0;box-sizing: border-box;}li{list-style: none;}a{text-decorat...
导航条变色 *{margin:0;padding:0;box-sizing: border-box;}li{list-style: none;}a{text-decorati...
1.仿微博发表评论 1)css样式 {margin:0;padding:0;}a{text-decoration: none;}input{border:0;}li{list...
仿新浪微博发布评论 1)css样式 .main{width: 800px;margin:20px auto;}span{display: inline-block;width...
一.访问元素的属性 A.核心Dom1.获得属性值: getAttrbuite('属性名');2.设置属性: setAttribute('属性名','值');3.移除属性: r...
正则表达式(Regular Expression): 1.定义: 规定字符串中出现规律的规则,用来检某个字符串是否符合规则或检测字符串中是否包含符合规定的子字符串 2.如何声...
1.Math.ceil() 上取整 alert(Math.ceil(3.5)) //4alert(Math.ceil(3.4)) //4alert(Math.ceil(-...
3.通过选择器查找 1.queryElementSelector:通过选择器查找,可以查找id名、class名和标签名,但是只能找到一个 用法: var ele = docu...
通过html查找 1 通过id查找:只能查找一个 用法: var ele = document.getElementById("main");2 通过class查找:可以找到...
通过元素间的关系查找 1).父子关系 parentElement 查找一个元素的父元素 用法: var a = tree.parentElement;children 查找父...