摘要:
/** * 删除url的指定参数 * @param {*} url 需要处理的url * @param {*} name 参数名称 */ export const deleteQueryString = (url, name) => { try { const re = new RegExp('&? 阅读全文
posted @ 2021-12-08 19:16
jerry-mengjie
阅读(871)
评论(0)
推荐(1)
摘要:
给dom添加额外信息,当dom移除,自动清除 <!DOCTYPE html> <html lang="en"> <body> <button id="btn">btn</button> <script> let wm = new WeakMap(); // console.log('window.b 阅读全文
posted @ 2021-12-08 19:08
jerry-mengjie
阅读(36)
评论(0)
推荐(0)
摘要:
IntersectionObserver内部使用getBoundingClientRect与requestIdleCallback实现 接近与离开0.5都会执行,去除接近0.5的执行 <!DOCTYPE html> <html lang="en"> <head> <style> body { mar 阅读全文
posted @ 2021-12-08 18:35
jerry-mengjie
阅读(73)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html lang="en"> <body> <button id="btn">箭头函数this</button> <script> let btn = document.getElementById("btn"); let obj = { name: "boy", 阅读全文
posted @ 2021-12-08 18:17
jerry-mengjie
阅读(32)
评论(0)
推荐(0)
摘要:
类新建的对象,执行是undefined class Animal { say() { console.log("say", this); } } let obj = new Animal(); let say = obj.say; say(); 字面量新建的对象,执行是window let obj 阅读全文
posted @ 2021-12-08 18:03
jerry-mengjie
阅读(122)
评论(0)
推荐(0)
摘要:
Array.prototype.myReduce = function (callback, prev) { for (let i = 0; i < this.length; i++) { if (typeof prev "undefined") { prev = callback(this[i], 阅读全文
posted @ 2021-12-08 17:46
jerry-mengjie
阅读(89)
评论(0)
推荐(0)
摘要:
利用javascript语言特性,预解析时this赋值点'.'的前面对象 Function.prototype.myCall = function (ctx, ...args) { ctx = ctx ? Object(ctx) : window; ctx.fn = this; //利用javasc 阅读全文
posted @ 2021-12-08 17:02
jerry-mengjie
阅读(38)
评论(0)
推荐(0)
摘要:
团队在用whistle抓包,iPhone安装证书后可抓取https,安卓试了几次失败,昨天看小伙伴安卓可以抓https,再次研究,发现坑在安装证书时选择类别,应该选择“VPN和应用”,不应该选择“WLAN”。鸿蒙系统—设置—安全—更多安全设置—加密和凭据—受信任的凭据—用户,此时有自己安装的证书,重 阅读全文
posted @ 2021-12-08 16:00
jerry-mengjie
阅读(1361)
评论(0)
推荐(0)

浙公网安备 33010602011771号