- 博客(4)
- 收藏
- 关注
原创 get-element-by-id转换为getElementById
function aaa(arr) { let newarr = arr.split('-') let rtnarr = '' return newarr.map((item,index)=>{ if (index>0) { let noe = item.slice(0,1).toUpperCase(); item = noe+ item.slice(1) } return .
2021-07-26 22:31:05 335
原创 对象深拷贝
js 深拷贝方法一function aaa(obj) { if (!(obj instanceof Object) && obj == null && typeof obj != 'object') return obj let newobj = isArray?[]: {} for (let key in obj) { // 判断是否是简单数据类型 if (obj instanceof Object &&
2021-07-26 00:53:51 71 1
原创 手机号验证码逻辑思维
代码functionrandom(count){letrandom=''for(leti=0;i<count;i++){random+=parseInt(Math.random()*36).toString(36)}returnrandom}console.log(random(6)); // 六位随机数...
2021-07-19 10:50:54 219 2
原创 css多余文字显示三个点显示
需要设置定宽才能实现overflow: hidden;text-overflow: ellipsis;white-space: nowrap;
2021-07-19 10:19:46 2822
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人