10 2021 档案
摘要:/** * @description: 倒计时开始时间点targetTime 参数 * @return 格式时间 */ export const cutDownTime = (targetTime) => { const currentSecond = parseInt(new Date().get
阅读全文
摘要:<div id="copyEl" onclick="handleCopy('123456789')">123456</div> <script> function handleCopy(data) { var oInput = document.createElement("input"); oIn
阅读全文
摘要:VConsole <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"></script> <script> // init vConsole var vConsole = new VConsol
阅读全文
摘要:无跳转重写url HTML5新接口,可以改变网址而不刷新页面 存在跨域问题,不支持重写到另一个域名下 仅改变网址,网页不会真的跳转,也不会获取到新的内容,本质上网页还停留在原页 一、window.history.pushState(data, title, targetURL); @状态对象:传给目
阅读全文
摘要:onpageshow 事件在每次加载页面时触发,onload 事件在页面第一次加载时触发,即 onload 事件在页面从浏览器缓存中读取时不触发。 onpagehide事件,该事件会在浏览器卸载页面的时候触发,而且是在unload事件之前触发。 $(function () { var isPageH
阅读全文
摘要:https://blog.csdn.net/dengsilinming/article/details/8000622 https://zhuanlan.zhihu.com/p/129854679?utm_source=wechat_session&utm_medium=social&utm_oi=
阅读全文