上一页 1 2 3 4 5 6 7 ··· 10 下一页

2022年3月28日

摘要: let str = 'abccccccdddww' function countNums(parentStr, childStr) { return parentStr.split(childStr).length - 1 } console.log(countNums(str, 'cc'))//3 阅读全文
posted @ 2022-03-28 21:12 GameCat 阅读(256) 评论(0) 推荐(0) 编辑
摘要: let str = `\nzifu_chuan chang\t` function func(str) { // 这里不去掉字符间的空格 return str.replace(/[\n\t\r\v\f]/g, '') } console.log(func(str)) 阅读全文
posted @ 2022-03-28 21:05 GameCat 阅读(506) 评论(0) 推荐(0) 编辑
摘要: let str = "zifu_chuan_chang" function func(str) { let arr = str.split('_') let resStr = arr.reduce(function(prev, cur){ let str = prev + cur.slice(0, 阅读全文
posted @ 2022-03-28 20:51 GameCat 阅读(590) 评论(0) 推荐(0) 编辑
摘要: let str = " zifu chuan " function func(str, target) { let arr = str.split('') arr.map(function(item, index){ if(item target){ arr.splice(index, 1) } } 阅读全文
posted @ 2022-03-28 20:20 GameCat 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 最简单而且最好理解的一种方法 let str = " zifu chuan " let newStr = str.split(' ').join('') console.log(newStr)// zifuchuan 不管原来的字符串中多少个空格都可以实现 阅读全文
posted @ 2022-03-28 20:05 GameCat 阅读(186) 评论(0) 推荐(0) 编辑

2022年3月27日

摘要: 这里学习的项目是B的视频教程, 这里只是做个笔记 使用vue-cli创建项目 配置项修改完善 package.json { /// 省略 "scripts": { "serve": "vue-cli-service serve --open", // 这里想要自动打开浏览器 但是自己测试效果不理想, 阅读全文
posted @ 2022-03-27 15:17 GameCat 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 百度搜索 nodejs 进入网站 http://nodejs.cn/ 或者直接输入地址 http://nodejs.cn/ 进入 进入网站的下载中心, 一般使用低版本的开发工具, 根据自己的系统下载对应的安装包 第一次安装可以参考视频教程安装, 比较方便 https://www.bilibili.c 阅读全文
posted @ 2022-03-27 14:17 GameCat 阅读(137) 评论(0) 推荐(0) 编辑

2022年3月26日

摘要: 1 使用css属性将一个div变成圆形 效果 <!DOCTYPE html> <html> <head> <title>two</title> <style> .test{ width: 100px; height: 100px; border-radius: 50%; /* 下面属性不重要 */ 阅读全文
posted @ 2022-03-26 18:06 GameCat 阅读(69) 评论(0) 推荐(0) 编辑
摘要: width 一般取 device-width height 一般不设置 initial-scale 初始缩放值 小数 一般为1 mininum-scale 最小缩放值 maxinum-scale 最大缩放值 user-scalable 可取值 yes | no 例子 <meta name="view 阅读全文
posted @ 2022-03-26 15:51 GameCat 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 不同源页面 这里造成不同源的方式是: 不同端口 第一个页面: 发送页面 send.html <!DOCTYPE html> <html> <head> <title>send</title> </head> <body> <iframe id="testTwo" src="http://127.0. 阅读全文
posted @ 2022-03-26 15:44 GameCat 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 10 下一页

导航