02 2019 档案
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-w
阅读全文
摘要:<!DOCTYPE html> <html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv
阅读全文
摘要:var express = require('express') var fs = require('fs') var app = express() // app.get('/abc', function (req, res, next) { // console.log('abc') // //
阅读全文
摘要:var express = require('express') var app = express() // 中间件:处理请求的,本质就是个函数 // 在 Express 中,对中间件有几种分类 // 当请求进来,会从第一个中间件开始进行匹配 // 如果匹配,则进来 // 如果请求进入中间件之后,
阅读全文
摘要:var http = require('http') var url = require('url') var cookie = require('./middlewares/cookie') var postBody = require('./middlewares/post-body') var
阅读全文
摘要:var fs = require('fs') var path = require('path') // 一般在开发命令行工具的时候,这个设计是必须有用的一个特性 // npm // webpack // __dirname 和 __filename 这俩哥们儿就是专门用来动态的获取当前文件以及文件
阅读全文
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form action="00-js中的一等公民函数.js" id="user_form">
阅读全文
摘要:var mongoose = require('mongoose') var Schema = mongoose.Schema // 1. 连接数据库 // 指定连接的数据库不需要存在,当你插入第一条数据之后就会自动被创建出来 mongoose.connect('mongodb://localhos
阅读全文
摘要:var fs = require('fs') fs.readFile('./data/a.txt', 'utf8', function (err, data) { if (err) { // return console.log('读取失败') // 抛出异常 // 1. 阻止程序的执行 // 2.
阅读全文
摘要:var fs = require('fs') var p1 = new Promise(function (resolve, reject) { fs.readFile('./data/a.txt', 'utf8', function (err, data) { if (err) { reject(
阅读全文
摘要:var fs = require('fs') function pReadFile(filePath) { return new Promise(function (resolve, reject) { fs.readFile(filePath, 'utf8', function (err, dat
阅读全文
摘要:// Express 对于没有设定的请求路径,默认会返回 Cat not get xxx // 如果你想要定制这个 404 // 需要通过中间件来配置 // 咱们讲中间件的时候说一下如何处理 // 只需要在自己的路由之后增加一个 app.use(function (req, res) { // 所有
阅读全文
摘要:// EcmaScript 6 对数组新增了很多方法 // find // findIndex // find 接收一个方法作为参数,方法内部返回一个条件 // find 会遍历所有的元素,执行你给定的带有条件返回值的函数 // 符合该条件的元素会作为 find 方法的返回值 // 如果遍历结束还没
阅读全文
摘要:<!-- 异步函数 setTimeout readFile writeFile readdir ajax --> <script> function get(url,callback) { var oReq = new XMLHttpRequest() //当请求加载成功之后要调用指定的函数 oRe
阅读全文
摘要:<script> function add(x,y,callback) { // callback 就是回调函数 // var x = 10 // var y = 20 // var callback = function(a){ } console.log(1) setTimeout(functi
阅读全文
摘要:<!--文件操作路径--> <!-- 在文件操作路径的相对路径中 ./data/a.txt 相对于当前目录 data/a.txt 相对于当前目录 /data/a.txt 绝对路径,当前文件模块所处磁盘根目录 c:/xx/xxx... 绝对路径 fs.readFile(`./data/a.txt`,f
阅读全文
摘要:require('./a') // 优先从缓存加载 // 由于 在 a 中已经加载过 b 了 // 所以这里不会重复加载 // 可以拿到其中的接口对象,但是不会重复执行里面的代码 // 这样做的目的是为了避免重复加载,提高模块加载效率 var fn = require('./b') console.
阅读全文
摘要:<script> // IE 8 不支持 ;['abc', 'd', 'efg'].forEach(function (item, index) { console.log(item) }) // 遍历 jQuery 元素 $.each(['abc', 'd', 'efg'], function (
阅读全文

浙公网安备 33010602011771号