摘要: 版本操作 回滚到某个版本 git reset --hard 9ea179a 恢复到最新版本 git reflog git reset --hard 最新版本号 分支操作 创建分支 git branch 分支名 切换分支 git checkout 分支名 master合并其他分支 git checko 阅读全文
posted @ 2021-07-26 21:46 贾正直 阅读(30) 评论(0) 推荐(0)
摘要: <script> function Phone(uname) { // 此方法每个实例共享 Phone.prototype.f = function() { console.log("prototype"); } this.name = uname; this.fun = function() { 阅读全文
posted @ 2021-07-26 16:04 贾正直 阅读(52) 评论(0) 推荐(0)
摘要: //实时显示鼠标在页面中的位置 var inp = document.querySelector("div"); document.addEventListener("mousemove", function (e) { inp.style.position = "absolute"; inp.st 阅读全文
posted @ 2021-07-25 21:54 贾正直 阅读(127) 评论(0) 推荐(0)
摘要: // 阻止右键出现菜单 document.addEventListener("contextmenu", function (e) { e.preventDefault(); }) // 阻止文字被选中 document.addEventListener("selectstart", functio 阅读全文
posted @ 2021-07-25 21:28 贾正直 阅读(33) 评论(0) 推荐(0)
摘要: function two(e) { alert("two"); console.log(e); 阻止默认行为 e.preventDefault(); 阻止向上冒泡 e.stopPropagation() } var div2 = document.querySelector("a"); div2.a 阅读全文
posted @ 2021-07-25 21:04 贾正直 阅读(25) 评论(0) 推荐(0)
摘要: 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 - 阅读全文
posted @ 2021-07-24 18:04 贾正直 阅读(43) 评论(0) 推荐(0)
摘要: 数据结构, 算法, 计算机操作系统, 计算机网络, 数据库系统。 阅读全文
posted @ 2021-07-19 11:23 贾正直 阅读(39) 评论(0) 推荐(0)
摘要: 将ren.bat文件放在要批量的文件夹内部 @echo off&setlocal EnableDelayedExpansion set a=1 for /f "delims=" %%i in ('dir /b *.jpg') do ( if not "%%~ni"=="%~n0" ( if !a! 阅读全文
posted @ 2021-07-02 15:03 贾正直 阅读(64) 评论(0) 推荐(0)
摘要: <style> /* vw等于屏幕视口宽度的1% */ div { background-color: aqua; /* 表示20%的视口宽度 */ width: 20vw; height: 20vw; } </style> </head> <body> <div class="test"></di 阅读全文
posted @ 2021-06-27 17:19 贾正直 阅读(45) 评论(0) 推荐(0)
摘要: <body> <div class="container"> <div class="row"> <div class="col-lg-3 col-xs-6">1</div> <div class="col-lg-3 col-xs-6">2</div> <div class="col-lg-3 co 阅读全文
posted @ 2021-06-27 16:46 贾正直 阅读(159) 评论(0) 推荐(0)