上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 引入:前后端分离:( 前端:写页面;请求数据;数据处理;后端:写 api 接口) 补充:学完 express,可以看koa 这个框架。 文档:https://expressjs.com/ 实现:登陆接口 express入门 1、安装express, 引入第三方框架 npm install expre 阅读全文
posted @ 2020-06-11 18:18 CatherLee 阅读(872) 评论(0) 推荐(0) 编辑
摘要: 1. http模块,网络请求 cheerio库, 将html格式的字符串转成类dom结构,之后可以分析结构,通过jq的语法选中其中的元素。 /* 1. 请求网站数据 2. 将数据保存本地文件 */ let picArr = [] const http=require('https') const f 阅读全文
posted @ 2020-06-11 14:59 CatherLee 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 一、概念 作用域链:子对象会一级一级地向上寻找所有父对象的变量。所以,父对象的所有变量,对子对象都是可见的,反之则不成立。 闭包就是,就是能够读取其他函数内部变量的函数。 由于在Javascript语言中,只有函数内部的子函数才能读取局部变量,因此可以把闭包简单理解成"定义在一个函数内部的函数"。能 阅读全文
posted @ 2020-06-11 14:28 CatherLee 阅读(453) 评论(0) 推荐(0) 编辑
摘要: node第三方模块 nodemailer,实现发邮件📧 https://www.npmjs.com/package/nodemailer "use strict"; const html = require('./email') const nodemailer = require("nodema 阅读全文
posted @ 2020-06-04 17:47 CatherLee 阅读(158) 评论(0) 推荐(0) 编辑
摘要: escape:编码,unescape解码, parse,stringfy const qs=require('querystring') // let string='name=wangyi&pass=123&sex=0' // let obj=qs.parse(string) // let str 阅读全文
posted @ 2020-06-04 14:16 CatherLee 阅读(265) 评论(0) 推荐(0) 编辑
摘要: url 类比json 记忆 url.parse 将url字符串转成对象url.format将url 对象转字符串 const url=require('url') let urlString='https:47.95.207.1:3000/fcj/recommend/hot/hehe?us=123& 阅读全文
posted @ 2020-06-04 12:08 CatherLee 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1、操作文件夹 mddir ,readdir,rename,rmdir const fs=require('fs'); //创建文件夹,不能创建重复的文件夹! fs.mkdir('./test',(err)=>{ console.log(err) }) //更改 fs.rename('./test' 阅读全文
posted @ 2020-06-04 11:23 CatherLee 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 粘性定位可以被认为是相对定位和固定定位的混合。元素在跨越特定阈值前为相对定位,之后为固定定位。 例如:#one { position: sticky; top: 10px; } 在 viewport 视口滚动到元素 top 距离小于 10px 之前,元素为相对定位。之后,元素将固定在与顶部距离 10 阅读全文
posted @ 2020-06-02 19:15 CatherLee 阅读(445) 评论(0) 推荐(0) 编辑
摘要: facebook登录接入文档: https://developers.facebook.com/docs/facebook-login/web 阅读全文
posted @ 2020-05-22 14:18 CatherLee 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 浏览器提供了 copy 命令 ,可以复制选中的内容:document.execCommand("copy") var text = document.getElementById("text").innerText;var input = document.getElementById("input 阅读全文
posted @ 2020-05-22 14:11 CatherLee 阅读(911) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页