07 2020 档案

摘要:1.找出数组中最大的元素 const arrayMax = arr => Math.max(...arr); arrayMax([2,3,4]) // 4 2.数组去重 const unique = arr => [...new Set(arr)]; unique([1,2,3,1]) // [1, 阅读全文

posted @ 2020-07-21 19:18 猫头唔食鱼 阅读(262) 评论(0) 推荐(0) 编辑

摘要:document.domain // 返回当前网站的域名 document.cookie // 获取所有cookie document.title // 当前文档标题 document.URL // 当前文档的地址 // document.location.href 和 window.locatio 阅读全文

posted @ 2020-07-02 15:48 猫头唔食鱼 阅读(184) 评论(0) 推荐(0) 编辑

摘要:num.toFix(n) 把数字四舍五入保留n位小数 var a = 123.789 a.toFixed(2) // 123.79 阅读全文

posted @ 2020-07-02 15:11 猫头唔食鱼 阅读(247) 评论(0) 推荐(0) 编辑

摘要:var date = new Date() console.log(date.getDate()); // 一个月里的第几天 console.log(date.getFullYear()); // 年 console.log(date.getMonth()+1); // 月 console.log( 阅读全文

posted @ 2020-07-02 14:54 猫头唔食鱼 阅读(372) 评论(0) 推荐(0) 编辑

摘要:使用toLocaleString()方法可以把数字转换千分位格式 var a = 12345678 console.log(a.toLocaleString()) // 12,345,678 阅读全文

posted @ 2020-07-02 11:18 猫头唔食鱼 阅读(366) 评论(0) 推荐(0) 编辑

摘要:+new Date() new Date().valueOf() 这两个方法作用是一样的,得到一串时间戳 阅读全文

posted @ 2020-07-02 11:02 猫头唔食鱼 阅读(349) 评论(0) 推荐(0) 编辑

摘要:点击了Nginx,但是完全没反应,打开任务管理器,看不到Nginx进程。 这是因为有进程占用了80端口。 现在要找出这个占用了80端口的进程。 打开cmd输入如下代码 netstat -ano 找到对应正在使用80端口的进程的pid,6956 启动任务管理器,点击查看/选择列 pid这个选项打钩,确 阅读全文

posted @ 2020-07-01 15:54 猫头唔食鱼 阅读(3677) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示