01 2021 档案

摘要:let arr1 =[1,2,3] //跟 let arr2 =[4,6,5] //子 let arr3 =[1,2,6] //根子都有 let frist =arr3.filter(item=> arr1.indexOf(item)>-1) //跟 let frist1 =arr3.filter( 阅读全文
posted @ 2021-01-29 16:25 王坤龙 阅读(335) 评论(0) 推荐(0)
摘要:单行文本溢出隐藏变为... p { /* 隐藏元素溢出内容 */ overflow: hidden; /* 单行显示 */ white-space: nowrap; /* 溢出显示省略号 */ text-overflow: ellipsis; } 多行文本溢出隐藏变为... p { overflow 阅读全文
posted @ 2021-01-29 15:39 王坤龙 阅读(603) 评论(0) 推荐(0)
摘要:(1)计算数组中每个元素出现的次数 let names = ['Alice', 'Bob', 'Tiff', 'Bruce', 'Alice']; let nameNum = names.reduce((pre,cur)=>{ if(cur in pre){ pre[cur]++ }else{ pr 阅读全文
posted @ 2021-01-26 13:51 王坤龙 阅读(240) 评论(0) 推荐(0)
摘要:效果图: html: <div class="notice"> <div class="rongqi"> <p v-for="(item, index) in paymember" :key="index"> <img :src="item.upic" alt=""> <span> &nbsp恭喜 阅读全文
posted @ 2021-01-22 15:50 王坤龙 阅读(379) 评论(0) 推荐(0)
摘要:<script> // 防抖 以最后一次输入为准 var textobj = { a: 1, b: 2 } var request = function () { console.log(this.a+this.b) } var debounce = function (fn, delaytime) 阅读全文
posted @ 2021-01-19 15:15 王坤龙 阅读(57) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>input file图片上传</title> </head> <body> <input type="file" accept="image/*" id="file" valu 阅读全文
posted @ 2021-01-16 13:06 王坤龙 阅读(201) 评论(0) 推荐(0)
摘要:由于国内谷歌不能登陆账户,在网上找了方法也没成功,但我在公司谷歌浏览器里收藏了好多有用的网址,没办法,一一写在这里以供以后方便使用吧 jquery在线手册:https://www.jq22.com/chm/jquery/index.html css animate动画库的使用:http://www. 阅读全文
posted @ 2021-01-11 10:50 王坤龙 阅读(238) 评论(0) 推荐(0)
摘要:我的大概思路是,用正则替换掉关键词。 let panter = new RegExp(关键词, 'g') 该行字符串.replace(panter, '<b style="color: #2D7BFF">' + 关键词 + '</b>') 阅读全文
posted @ 2021-01-04 15:08 王坤龙 阅读(628) 评论(0) 推荐(0)