- 昵称:51助手
- 博龄:4年10个月5天
- 粉丝:122
- 关注:108
- +关注
搜索
文章分类
博客档案
vue3 ref获取元素属性
摘要:<div ref="test" data-id="2"></div> this.$refs.test.attributes['data-id'].value);
css active属性手机端不支持,实现按钮效果
摘要:指定元素添加touchstart事件$('.prize-btn').on('touchstart',function(){ //...空函数即可 });或body上添加touchstart事件document.body.addEventListener('touchst
js常用的3种弹出提示框(alert、confirm、prompt)
摘要:// 没有返回值 alert('你好');// 返回 false/true let res = confirm('确定删除?'); console.log(res);// 返回用户输入的值或null, 第二个值为指定的默认值(可选) var
js自动获取视频封面
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>获取视频封面</title> </head> <body> <img sr
js获取视频封面
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body>
vue 随便改任何地方就报错 Error: ENOSPC: no space left on device
摘要:Error: ENOSPC: no space left on device提示空间不足删除一下 node_modules/.cache 里的缓存文件就可以了
js 历史搜索记录
摘要:import Cookies from 'js-cookie';setHis() { let his = Cookies.get('his') if (his) { his = JSON.par
js数组去重、去除空值
摘要:直接给一个新的数组里面,利用es6的延展运算符arr = [...new Set(arr)] //去重arr = arr.filter(function (s) {return s && s.trim()}) //去除空值
vue 苹果手机输入框页面会缩放问题
摘要:<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">