上一页 1 2 3 4 5 6 7 ··· 19 下一页
摘要: count.js中的代码如下: export default function count(x,y) { return x - y; } sum.js中的代码如下: export default function sum(...args) { return args.reduce((p, c) => 阅读全文
posted @ 2026-01-14 11:58 chenlight 阅读(3) 评论(0) 推荐(0)
摘要: 自执行的箭头函数(也常叫立即执行的箭头函数),简单来说就是定义后立刻执行的箭头函数,这是 JavaScript 中一种常用的代码封装和立即执行的写法。 一、自执行箭头函数的基础写法 首先先看最核心的写法,核心思路是:用括号包裹箭头函数(让解析器识别为函数表达式而非函数声明),再紧跟一对括号触发执行。 阅读全文
posted @ 2026-01-13 18:24 chenlight 阅读(8) 评论(0) 推荐(0)
摘要: 表单的 onsubmit="return loginCheck(this)" 这段代码,核心需求应该是想深入理解这行代码的作用、语法细节: 一、逐字拆解这行代码的含义 1. onsubmit 这是 HTML 表单的提交事件属性,当用户点击表单的提交按钮(<button type="submit">) 阅读全文
posted @ 2026-01-12 20:42 chenlight 阅读(18) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <script> //函数可以提升 fn() function fn(){ console.log(` 阅读全文
posted @ 2026-01-12 17:33 chenlight 阅读(1) 评论(0) 推荐(0)
摘要: 一、闭包的标准定义 闭包函数中,return返回的函数多了一对括号(),也就是说:func_out 函数最后返回的是 func_inner()(带括号),这表示返回的是内部函数执行后的结果(也就是 None),而不是返回内部函数本身。所以后续调用 new_func() 时会报错,因为 new_fun 阅读全文
posted @ 2026-01-11 20:50 chenlight 阅读(7) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <form id="myForm"> <input type="text" name="usernam 阅读全文
posted @ 2026-01-10 10:50 chenlight 阅读(11) 评论(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 @ 2026-01-09 16:30 chenlight 阅读(2) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>submit测试</title> </head> <body> <form class="info"> <input type="text" name="nam 阅读全文
posted @ 2026-01-08 13:57 chenlight 阅读(2) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2026-01-06 11:34 chenlight 阅读(3) 评论(0) 推荐(0)
摘要: 在 Microsoft Edge 浏览器(或基于 Chromium 的浏览器,如 Chrome)中,“保留日志” 和 “禁用缓存” 是开发者工具(DevTools)中的两个非常实用的功能,主要用于调试网页加载、网络请求和性能问题。下面详细介绍这两个功能的用途与用法。 🧩 一、“保留日志”(Pres 阅读全文
posted @ 2026-01-02 17:21 chenlight 阅读(94) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 19 下一页