07 2021 档案
摘要:// 数组遍历方式 let arr = ["a", "b"]; //forEach arr.forEach((a, b) => { console.log(b, ":", a); }) //for of for (const el of arr) { console.log(el, " indexo
阅读全文
摘要:jsonp:通过请求script资源 html代码: <body> <div> hello world</div> </body> <style></style> <script> function hello() { document.querySelector("div").style.back
阅读全文
摘要:npm配置下载镜像 npm config set registry https://registry.npm.taobao.org npm查询下载镜像 npm config get registry
阅读全文
摘要:版本操作 回滚到某个版本 git reset --hard 9ea179a 恢复到最新版本 git reflog git reset --hard 最新版本号 分支操作 创建分支 git branch 分支名 切换分支 git checkout 分支名 master合并其他分支 git checko
阅读全文
摘要:<script> function Phone(uname) { // 此方法每个实例共享 Phone.prototype.f = function() { console.log("prototype"); } this.name = uname; this.fun = function() {
阅读全文
摘要://实时显示鼠标在页面中的位置 var inp = document.querySelector("div"); document.addEventListener("mousemove", function (e) { inp.style.position = "absolute"; inp.st
阅读全文
摘要:// 阻止右键出现菜单 document.addEventListener("contextmenu", function (e) { e.preventDefault(); }) // 阻止文字被选中 document.addEventListener("selectstart", functio
阅读全文
摘要:function two(e) { alert("two"); console.log(e); 阻止默认行为 e.preventDefault(); 阻止向上冒泡 e.stopPropagation() } var div2 = document.querySelector("a"); div2.a
阅读全文
摘要:var arr = [3, 1, 5, 22, 13, 18, 66, 43, 33, 6]; for (let index = 0; index < arr.length - 1; index++) { for (let index1 = 0; index1 < arr.length - 1 -
阅读全文
摘要:将ren.bat文件放在要批量的文件夹内部 @echo off&setlocal EnableDelayedExpansion set a=1 for /f "delims=" %%i in ('dir /b *.jpg') do ( if not "%%~ni"=="%~n0" ( if !a!
阅读全文

浙公网安备 33010602011771号