摘要:后端设置响应头set-cookie set-cookie mykey=12; Expires=截至MGT时间; Max-age=180; Domain=域名; Path=/; SameSite=Lax; Secure; http-only name=value:必须项,键值对(不能有分号、逗号、空格
阅读全文
摘要:// ajax 基本语法 const xhr = new XMLHttpRequest() xhr.open() xhr.send() xhr.onload = function () { console.log(xhr.responseText) }
阅读全文
摘要:节点类型 元素类型 元素节点 属性节点 文本节点 注释节点 nodeName 大写标签名 属性名 #test #comment nodeType 1 2 3 8 nodeValue null 属性值 文本内容 注释内容 获取节点 <body> <ul> <!-- 注释 --> <li>1</li>
阅读全文
摘要:🐊 😭 😂 😄 😍 😛 🤔 🤐 😴 🤧 🤠 😎 😞 😠 💩 😸 🙈 ❤ 💋 😄 😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 🫠
阅读全文
摘要:function getintrandom(a,b){ return Math.floor(Math.random()*(Math.abs(b-a)+1)+Math.min(a,b))//包头包尾 }
阅读全文
摘要:document.write('<table style="border-spacing:12px">') for (var j = 1; j <= 9; j++) { document.write('<tr align="left">') for (var i = 1; i <= j; i++)
阅读全文
摘要://****************节流********************** //节流代码 function throttle(f) { let timer return function () { if (timer) return timer = setTimeout(() => { f
阅读全文