摘要:
项目初始化 npm init npm init -y 安装项目依赖 {包} npm install npm install 包名 --save npm install 包名 -g npm install 包名@版本号 npm update ... npm uninstall 包名 -g 阅读全文
posted @ 2021-11-24 12:12
彩色海豹
阅读(33)
评论(0)
推荐(0)
摘要:
e.stopPropagation();阻止事件冒泡 e.preventDefault(); 阻止默认行为 reset submit a[href] 没有参数时获取,带参数时设置 html 包含html标签的代码 div<span>span</span> text 纯文本 divspan val 交 阅读全文
posted @ 2021-11-10 11:35
彩色海豹
阅读(46)
评论(0)
推荐(0)
摘要:
三种写法 $(document).ready(function(){ }) $().ready(function(){ }) $(function(){ }) js转化为jquery jq=$(js/dom) jq=$(div) jq=$("<li>列表</li>") jquery转化为js [0] 阅读全文
posted @ 2021-11-10 11:32
彩色海豹
阅读(110)
评论(0)
推荐(0)
摘要:
document.querySelector(); 对象document.querySelectorAll(); 数组var ul =document.querySelector("ul");console.log(ul.children)不包括文本节点console.log(ul.childNod 阅读全文
posted @ 2021-11-05 18:41
彩色海豹
阅读(26)
评论(0)
推荐(0)
摘要:
\d 0-9任意一个数字必须要小写 [] 任意一个字符 [0-9] \d 12 => [12]//代表匹配1,2 [1][2],12 匹配的12 [12a] 1,2,a [a-zA-Z0-9_] [^] 非其中的一个字符 \w 数字,字母,下划线必须要小写 . 匹配任意一个字符 [.] 匹配的就是一 阅读全文
posted @ 2021-11-04 16:55
彩色海豹
阅读(31)
评论(0)
推荐(0)
摘要:
console.log(a=2); console.log(a=="2") 等于数值 console.log(a 2) 绝对等于 parseInt 取整数没有四舍五入 81.5 81 转换不了直接放弃后面的 +0.5就是四舍五入 parseFloat 可以取小数 转换不了直接放弃后面的 functi 阅读全文
posted @ 2021-11-02 17:23
彩色海豹
阅读(22)
评论(0)
推荐(0)
摘要:
iframe添加别的页面过来 overflow: hidden;删除滚动条 justify-content: space-between; 两端对齐 阅读全文
posted @ 2021-11-01 12:51
彩色海豹
阅读(12)
评论(0)
推荐(0)
浙公网安备 33010602011771号