灵心如玉,守一生无惧|

SadicZhou

园龄:3年2个月粉丝:7关注:4

11 2022 档案

vue2生命周期
摘要:1.有哪些生命周期: beforeCreate created beforeMount mounted beforeUpdate updated beforeDestroy destroyed 2.一旦进入页面或组件会执行哪些生命周期: beforeCreate created beforeMoun
72
0
0
JS基础12--break和continue
摘要:<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=
16
0
0
JS基础11-3强制类型转换Boolean
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi
17
0
0
JS基础11-2强制类型转换Number
摘要:<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=
202
0
0
JS基础11-1强制类型转换String
摘要:<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=
179
0
0
JS基础10-对象3枚举对象的属性
摘要:<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=
12
0
0
node08_01使用express创建最基本的服务器
摘要:Express:基于 Node.js 平台,快速、开放、极简的 Web 开发框架。 文档:https://www.expressjs.com.cn/ 下载:$ npm install express --save //1.导入express const express = require('expr
35
0
0
node07_自定义一个html转义模块
摘要:在日常开发的过程中除了转换时间之外,我们可能还会遇到需要将html代码转义成文本,以及将文本转义成html的需求,下面我们来自定义一个转义的模块。 具体的思路就是使用正则表达式,找到对应的要转义的字符进行转义即可。 function htmlEsplace(htmlstr) { //定义转义html
56
0
0
node_06自定义一个格式化时间模块并使用
摘要:在上一篇博客中,我们知道了自定义模块的定义以及如何暴露出去让其他模块使用。 在日常的开发过程中我们经常会遇到一些处理时间格式的问题,下面我们来自定义一个处理时间的模块。 我们计划将时间格式化为:xxxx-xx-xx- xx:xx:xx,所以第一步我们需要定义一个补零函数。在小于9时给月、日、时、分、
126
0
0
node05_模块化以及module对象
摘要:1.定义一个自定义模块 //当前这个文件,就是一个用户自定义模块console.log('加载了06这个模块') 2.引入定义的自定义模块 //使用require()方法加载其他模块时,会执行被加载模块中的代码 const m1 = require('./06m1模块化1') console.log
64
0
0
node04_05时钟web服务器
摘要:1.创建clock文件夹,里面有index.hrml和对应的css文件 2.编写node代码 //1.1导入http模块 const http = require('http') //1.2导入fs模块 const fs = require('fs') //1.3导入path模块 const pat
19
0
0
node04_04.根据不同的URL响应不同的html内容
摘要:const http = require('http') const server = http.createServer() server.on('request',function(req,res){ //1.获取请求的URL地址 const url = req.url //2.设置默认的响应内
13
0
0
node04_03解决中文乱码的问题
摘要:const http = require('http') const server = http.createServer() server.on('request',function(req,res){ const url = req.url const method = req.method c
17
0
0
node04_02了解req请求对象
摘要:req.app:当callback为外部文件时,用req.app访问express的实例 req.baseUrl:获取路由当前安装的URL路径 req.body / req.cookies:获得「请求主体」/ Cookies,//post请求参数获取 req.fresh / req.stale:判断
39
0
0
node4_01创建基本的web服务器
摘要://1.导入http模块 const http = require("http") //2.创建web服务器实例 const server = http.createServer() //3.为服务器实例绑定request实例,监听客户端的请求 server.on('request',functio
19
0
0
node3_path.join和path.basename、path.extname用法
摘要:const path = require('path') // ../会抵消一级路径 const pathStr = path.join('/a','/b/c','../','./d','e') console.log(pathStr) //凡是涉及到路径拼接的问题,都要使用path.join方法,
39
0
0
node2_动态路径拼接错误问题
摘要:如果使用相对路径,不在当前目录下通过其他目录来找到这个JS运行就会报错,当我们使用fs模块来操作文件时,我们如果使用相对路径的话,很容易出现路劲动态拼接错误的情况,JS在Node.js环境中运行的时候,执行的是当前所在的目录拼接上被操作文件的路径,这时如果我们不在当前文件的路径,无论怎么样手动添加补
49
0
0
node1_使用fs模块整理成绩单
摘要:fs: file system 文件系统模块是node中内置模块用于本地文件或者目录的增删改查操作直接导入即可使用 const fs = require('fs') fs.readFile('./point.txt', 'utf-8', (err, data) => { if (err) { ret
46
0
0
点击右上角即可分享
微信分享提示
深色
回顶
收起
  1. 1 尚好的青春 孙燕姿
  2. 2 孙燕姿
  3. 3 克卜勒 孙燕姿
- 孙燕姿
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.