摘要: let lastTime='' let code='' let timer=null document.addEventListener('keydown',(e)=>{ let thisTime=new Date().getTime() if(!lastTime){ lastTime=thisTi 阅读全文
posted @ 2021-10-05 16:12 85455 阅读(209) 评论(0) 推荐(0)
摘要: 类数组有哪些1,特殊的object,必须有length属性,相当于数组的长度,所以length需要是大于0的整数, 属性需要是数字或者数字字符串也可以2,getElementByTagName获取到的元素集合也是个类数组3,arguments对象也是一个类数组将类数组转化成真正的数组1.Array. 阅读全文
posted @ 2021-07-24 18:58 85455 阅读(89) 评论(0) 推荐(0)
摘要: arr.push(...new Array(n).fill(item)) 阅读全文
posted @ 2021-07-24 10:43 85455 阅读(403) 评论(0) 推荐(0)
摘要: 比较两个字符串 阅读全文
posted @ 2021-07-23 21:16 85455 阅读(36) 评论(0) 推荐(0)
摘要: 1.jsonp javascript标签src实现,只能发送get请求 2.cors 需要后台配置允许跨域 3.服务器代理 vue.config.js中配置跨域 devServer: { proxy: { // detail: https://cli.vuejs.org/config/#devser 阅读全文
posted @ 2020-04-01 21:04 85455 阅读(130) 评论(0) 推荐(0)
摘要: 1.window.addEventListener('storage',function(event){ }) window绑定storage事件,当localstorage中的只发生改变的时候触发 2.通过cookie+setInterval实现 3.websocket实现 4.sharedWor 阅读全文
posted @ 2020-04-01 17:24 85455 阅读(215) 评论(0) 推荐(0)
摘要: <script type="text/javascript"> var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 var isiOS 阅读全文
posted @ 2020-03-31 23:20 85455 阅读(600) 评论(0) 推荐(0)
摘要: 1.禁止图片点击放大 img { pointer-event:none } 2.禁止ios识别长串数字为电话 <meta name="format-detection" content="telephone=no" /> 3.禁止复制选中文本 -webkit-user-select:none 4.上 阅读全文
posted @ 2020-03-31 23:14 85455 阅读(142) 评论(0) 推荐(0)
摘要: 前言vue路由组件我使用的vue-routerweb服务器使用nginx Vue-router配置vue-router 默认 hash 模式 —— 使用 URL 的 hash 来模拟一个完整的 URL,于是当 URL 改变时,页面不会重新加载http://localhost:8080/#/Hello 阅读全文
posted @ 2020-03-31 22:22 85455 阅读(809) 评论(0) 推荐(0)
摘要: 设置cookie: document.cookie='name=zhangsan' document.cookie='age=18' 获取cookie document.cookie // name=zhangsan; age=18 阅读全文
posted @ 2020-03-31 22:20 85455 阅读(922) 评论(0) 推荐(0)