JS 原生DOM 的操作 dom..setAttribute("class",classVal ); //替换class dom.classList.add("类名") /...
JS 原生DOM 的操作 dom..setAttribute("class",classVal ); //替换class dom.classList.add("类名") /...
1. git init 2. git add . 3.git commit -m "first commit" 4.git remote add origin 5.git p...
第一步,生成ssh-key ssh-keygen -t rsa -b 4096 -C "xxxx" 第二步,添加id_rsa ssh-add ~/.ssh/id_rsa 第三...
1解释下闭包 闭包就是能够读取其他函数内部变量得函数。可以理解为定义在一个函数内部的函数。本质上闭包是将函数内部和函数外部连接起来的桥梁。 CSS左右定宽 中间自适应怎样...
一、this的指向 普通函数调用 function fn(){ console.log(this) //this指向window}fn() 对象方法的调用 var obj...
图片加载成功的函数 document.getElementById("img").onload=function(){console.log("图片加载已完成")} 图片加载...
(function () {
console.log(1);
setTimeout(function () {
console.log(2);
}, 1000);
setTimeout(function () {
console.log(3);
}, 1000);
console.log(4);
});
执行结果是1,4,2,3哎
.text{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
新增cookie varday=newDate();day.setTime(day.getTime()+72*60*60*1000); //设置cookie 3天后到期doc...
varrows=[{"name":"张三","time":"2011/4/10:00:00"},{"name":"李四","time":"2015/5/612:30:00"}...
简单的数组 leta=[1,2,3,4,5]; letb=[1,2,3,4,5,6,7,8,9]; 并集 letarr=Array.from(newSet([...a,......