11 2021 档案
路由查询/添加/删除2(总)
摘要:app文件: //引入类 const Koa = require('koa'); const Router =require('koa-router'); const koaBody = require('koa-body'); const tagRouter =require("./routers 阅读全文
posted @ 2021-11-30 15:24 陶小黑 阅读(76) 评论(0) 推荐(0)
路由查询/添加/删除
摘要://app.js//引入类 const Koa = require('koa'); const Router =require('koa-router'); const koaBody = require('koa-body'); const tagRouter =require("./router 阅读全文
posted @ 2021-11-29 17:43 陶小黑 阅读(153) 评论(0) 推荐(0)
koa-router学习
摘要:https://www.npmjs.com/ //引入类 const Koa = require('koa'); const Router =require('koa-router') //引入内部方法或属性 //const{方法或属性名} =require('koa'); //创建对象 const 阅读全文
posted @ 2021-11-26 12:17 陶小黑 阅读(304) 评论(0) 推荐(0)
node使用基础
摘要:使用: // 引入对象 const Koa = require('koa'); // 引入内部方法属性 // const(方法或属性)=require('koa'); // 创建对象 const app = new Koa(); // response app.use(ctx => { ctx.bo 阅读全文
posted @ 2021-11-25 12:16 陶小黑 阅读(44) 评论(0) 推荐(0)
es6.001
摘要:ES6: es2015(es6) 、es2016(es7)、es2017(es8) 、es2018(es9) 、es2019(es10) (es6为基础,进行兼容扩展) value 、let变量声明 // 块级区域 { var value=10; let count=20; } console.lo 阅读全文
posted @ 2021-11-24 11:53 陶小黑 阅读(33) 评论(0) 推荐(0)
fetch
摘要:https://developer.mozilla.org/zh-CN/docs/Web web 开发网站 https://unpkg.com/axios/dist/axios.min.js axios代码网址 fetch('./01data.json',{}) //{里面是参数} .then(fu 阅读全文
posted @ 2021-11-23 10:35 陶小黑 阅读(99) 评论(0) 推荐(0)
ajax 基础
摘要:基础数据格式 1) 创建 XMLHttpRequest 对象,也就是创建一个异步调用对象 2) 创建一个新的 HTTP 请求,并指定该 HTTP 请求的方法、URL 及验证信息 3) 设置响应 HTTP 请求状态变化的函数 4) 发送 HTTP 请求 5) 获取异步调用返回的数据 6) 使用 Jav 阅读全文
posted @ 2021-11-22 11:57 陶小黑 阅读(38) 评论(0) 推荐(0)
js高级函数
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-11-19 13:24 陶小黑 阅读(45) 评论(0) 推荐(0)
js高级
摘要:构造函数: 原理: 把showName(公共内容)独立出去,否则占用空间 prototype 原型 构造函数的原型 像形化,两个对象,对象所存在的属性(内容),如果想在其他对象中,找到 这个属性(内容): student.prototype=new people("name"); 对象1.proto 阅读全文
posted @ 2021-11-17 17:23 陶小黑 阅读(46) 评论(0) 推荐(0)
jq计算+遮罩层
摘要:$(function(){ $("#loginPopup").click(function(){ $(".pop-bg,.pop-wrapper").show(); //显示 $("body").css("overflow","hidden"); //boby不滚动 }) //.pop-bg,.po 阅读全文
posted @ 2021-11-16 19:24 陶小黑 阅读(38) 评论(0) 推荐(0)
jq基础学习(扩展)
摘要:// closest 向外寻找 最近的选择器 例: $(function(){ $(".load-more").click(function(){ // closest 向外寻找 最近的选择器 if($(this).hasClass("active")){ $(this).removeClass(" 阅读全文
posted @ 2021-11-15 17:09 陶小黑 阅读(30) 评论(0) 推荐(0)
jq基础学习(轮播)
摘要:$(function(){ var current=0; var count=$(".pics-list>li").length; // 播放轮播 function move(){ $(".points-list>li").eq(current).addClass("active").sibling 阅读全文
posted @ 2021-11-15 17:08 陶小黑 阅读(44) 评论(0) 推荐(0)
jq基础学习(效果)
摘要:增加行内样式 display: show() 显示 隐藏 display:none 显示 display:原始值 如果没有原始值 删除display样式 .show(1000) 带路线 延迟 左上角->右下角 hide() 隐藏 .hide(1000) 带路线 延迟 右上角->左下角 toggle( 阅读全文
posted @ 2021-11-12 11:31 陶小黑 阅读(29) 评论(0) 推荐(0)
jq基础学习(文档处理)
摘要:append 后面面添加子节点 prepend 前面添加子节点 before 前面增加兄弟节点 after 后面增加兄弟节点 wrap 增加父节点 replaceWith 替换 $(".replaceWith").click(function(){ $("li:first").replaceWith 阅读全文
posted @ 2021-11-11 11:27 陶小黑 阅读(44) 评论(0) 推荐(0)
jq基础(事件2)2021-11-10补
摘要:鼠标事件:位置区别 page 当前页面右上角 offset 元素的左上角 client 视图可视区域左上角 scveen 屏幕左上角 相对显示器 防抖和节流 作用是:一个人在同时多次调用一个方法是只执行他最后一次 比如满屏幕移动窗口 jquery 阻止冒泡事件 e.stopPropagation() 阅读全文
posted @ 2021-11-11 09:24 陶小黑 阅读(93) 评论(0) 推荐(0)
辅助学习网站
摘要:https://swiper.com.cn/ 轮播图 jquery.zoom 放大镜 https://www.aicesu.cn/doc/animate.html https://animate.style/ 动画 https://www.dowebok.com/demo/131/ 滚动 https 阅读全文
posted @ 2021-11-09 12:19 陶小黑 阅读(80) 评论(0) 推荐(0)
js基础学习(选择器)
摘要:attr(属性名) 获取属性 attr(属性名,属性值) 设置属性 <script > $(function(){ //全选 $("#sex").change(function(){ var chk1= $(this).prop("checked") $(":checkbox:not([id])") 阅读全文
posted @ 2021-11-09 11:49 陶小黑 阅读(46) 评论(0) 推荐(0)
jq基础学习
摘要:三种写法: $(document).ready(function(){ }) $().ready(function(){ }) $(function(){ }) 筛选器可以单独使用 例如: $div=$(*:first) 索引调用: $("li:eq(2)").css("color","red"); 阅读全文
posted @ 2021-11-08 12:03 陶小黑 阅读(41) 评论(0) 推荐(0)
js基础学习(克隆)
摘要:浅克隆: var stu1={ id:1000, name:"张三", class:{ name:"web", count:40 } } //克隆stu1的属性 var stu2={}; stu2.id=stu1.id; stu2.name=stu1.name; stu2.class=stu1.cl 阅读全文
posted @ 2021-11-08 11:09 陶小黑 阅读(38) 评论(0) 推荐(0)
js基础学习(tab切换)
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2021-11-05 17:31 陶小黑 阅读(33) 评论(0) 推荐(0)
js基础学习(动画。放大镜)
摘要:onmousemove事件: 跟着鼠标移动而改变。 onmouseout事件: 鼠标离开; onmouseenter事件: 鼠标离开; 放大镜效果案例: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http 阅读全文
posted @ 2021-11-05 16:42 陶小黑 阅读(58) 评论(0) 推荐(0)
js基础学习(dom)
摘要:调用数据的4种方法: document.getElementById(); document.getElementsByClassName(); document.getElementsByName(); document.getElementsByTagName(); 调用数组或者数组的方法: d 阅读全文
posted @ 2021-11-05 15:19 陶小黑 阅读(56) 评论(0) 推荐(0)
js基础学习(对像)
摘要:4种方法:字面量、function、object 1、 字面量 json 对象 var student={ id:1000, name:"张三", scores:[ {subject:"html",score:90}, {subject:"js",score:80} ] } 2、function f 阅读全文
posted @ 2021-11-04 16:52 陶小黑 阅读(56) 评论(0) 推荐(0)
js基础学习(正则表达式)
摘要:js正则表达式的用法: var reg=/\d/ var reg2=new RegExp("\b"); 正则表达式: \d 0-9任意一个数字 \D 任意一个非数字(大写为意思相反) [] 任意一个字符 12=>[1][2] 12 [12a] 1、2、a [a-zA-Z0-9] 任意一个数或者字母( 阅读全文
posted @ 2021-11-04 15:20 陶小黑 阅读(132) 评论(0) 推荐(0)
visual studio code新学软件(js基础)
摘要:第一种行内js: 第二种script内: 第三种引用js: 第四种:(空连接) number 数值 整数和小数 string 字符转 (字符) "" , '' bool 布尔类型 true/false null 没有/空 undefined 没有赋值 未定义 symbol es6 object 正则 阅读全文
posted @ 2021-11-02 17:16 陶小黑 阅读(278) 评论(0) 推荐(0)
html+css基础弹窗(源代码)
摘要:<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <link rel="stylesheet" type="text/css" href="./css/login.css"/> <style type="text/ 阅读全文
posted @ 2021-11-01 17:06 陶小黑 阅读(1831) 评论(0) 推荐(0)
html+css基础(弹出框)
摘要:var box=document.querySelector(".box"); 获取第一个class为.box的元素 background-color: rgba(0,0,0,0.333); rgba(颜色,透明度) &times;(方法)“ x ” 案例:按钮显示: <!DOCTYPE html> 阅读全文
posted @ 2021-11-01 17:05 陶小黑 阅读(671) 评论(0) 推荐(0)