上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 61 下一页
摘要: // var $p = $('<p id="insert">我是新添加的p标签</p>') var $p = $('<p>我是新添加的p标签</p>',{ id:'insert', class:"insert" }) $('#box').append($p) var $box = $('#box') 阅读全文
posted @ 2022-02-17 15:56 13522679763-任国强 阅读(28) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-02-17 15:56 13522679763-任国强 阅读(17) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-02-17 15:53 13522679763-任国强 阅读(27) 评论(0) 推荐(0)
摘要: const fs = window.require('fs').promises // const path = window.require('path') const fileHelper = { readFile:(path) => { return fs.readFile(path,{enc 阅读全文
posted @ 2022-02-07 21:09 13522679763-任国强 阅读(29) 评论(0) 推荐(0)
摘要: export const flattenArr = (arr) => { return arr.reduce((map,item)=>{ map[item.id] = item return map },{}) } export const objToArr = (obj) => { return 阅读全文
posted @ 2022-02-07 21:09 13522679763-任国强 阅读(22) 评论(0) 推荐(0)
摘要: async function renderMovie(){ const res = await fetch('/api/getMovie') const json = await res.json() let data = json.data.house43 console.log(data); l 阅读全文
posted @ 2022-02-07 15:26 13522679763-任国强 阅读(42) 评论(0) 推荐(0)
摘要: // install 主要就是缓存内容 const CACHE_NAME = 'cahe_v1' const URLS = [ '/', '/index.css', '/images/1.png', '/index.js', '/manifest.json', '/api/66462d0145d35 阅读全文
posted @ 2022-02-07 15:26 13522679763-任国强 阅读(225) 评论(0) 推荐(0)
摘要: service worker 使用步骤 <script> // 1 在网页加载完成的时候 注册 service worker window.addEventListener('load', () => { // 2 能力检测 if ('serviceWorker' in navigator) { n 阅读全文
posted @ 2022-02-07 15:25 13522679763-任国强 阅读(50) 评论(0) 推荐(0)
摘要: /** * 如果页面一进来, 发现用户没有联网,给用户发一个通知 * */ if(Notification.permission 'default'){ Notification.requestPermission() } if(!navigator.onLine){ new Notificatio 阅读全文
posted @ 2022-02-07 15:25 13522679763-任国强 阅读(78) 评论(0) 推荐(0)
摘要: manifest 使用步骤 1 新建一个 manifest.json 文件 2 在 index.html 引入 manifest.json 文件 3 在 manifest.json 文件中提供常见的配置 4 需要在 https 协议或者 http://localhost 下访问项目 <link re 阅读全文
posted @ 2022-02-07 15:24 13522679763-任国强 阅读(395) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 61 下一页