摘要:
//引入类 const Koa = require('koa'); //引入内部方法或属性 //const{方法或属性名} =require('koa'); //创建对象 const app = new Koa(); //response app.use(ctx =>{ ctx.body = 'He
阅读全文
posted @ 2021-11-26 08:12
高山柴郡
阅读(124)
推荐(0)
摘要:
### 项目初始化 `npm init` `npm inti -y` ### 项目依赖(包) `npm install` `npm install 包名 --save(-S)` `npm install 包名 -g` `npm install 包名@版本号` `npm updata ...` ` n
阅读全文
posted @ 2021-11-25 08:19
高山柴郡
阅读(204)
推荐(0)
摘要:
fetch('./00 data.json',{}) .then(function (response) { return response.json(); }) .then(function(data){ console.log(data); }) .catch(function(){ //rej
阅读全文
posted @ 2021-11-24 12:17
高山柴郡
阅读(342)
推荐(0)
摘要:
data:{id:10001},//请求参数 data:"id=10001&name=zhangsan",application/x-www-form-urlencoded contentType:"json",//请求格式 参数的格式 AJAX = Asynchronous JavaScript
阅读全文
posted @ 2021-11-23 09:31
高山柴郡
阅读(135)
推荐(0)
摘要:
<div id="app"> <p>页面载入时,input 元素自动获取焦点:</p> <input v-focus> </div> <script> // 创建根实例 new Vue({ el: '#app', directives: { // 注册一个局部的自定义指令 v-focus focus
阅读全文
posted @ 2021-11-18 13:23
高山柴郡
阅读(166)
推荐(0)
摘要:
类选择器 $(function(){ $(".top-list .title").click(function(){ $(this).addClass("active").siblings().removeClass("active"); $(".top-list-main ul").eq($(th
阅读全文
posted @ 2021-11-17 13:59
高山柴郡
阅读(165)
推荐(0)
摘要:
样式 var $list = $(this).closest(".filter-list"); var height = $list.css("height"); if(height "30px"){ $(this).addClass("active"); $list.css({"overflow"
阅读全文
posted @ 2021-11-16 14:20
高山柴郡
阅读(15)
推荐(0)
摘要:
$("div").animate({width:"400px"},1000) $("div").animate({width:"400px",height:"400px",opacity:0.3},1000) 行内样式 height 动画路线 上<->下 行内样式 display 隐藏 displa
阅读全文
posted @ 2021-11-15 15:24
高山柴郡
阅读(22)
推荐(0)
摘要:
通过点击过其他事件可以对已有的文档列表进行数据插入、包裹、替换、删除和复制操作以 ul li 为例:prepend() append() 可以分别在无序列表ul内部的前后添加子节点 after() before() 可以分别在无序列表ul外部的前后添加兄弟节点 wrap() 可以为某一个元素添加父节
阅读全文
posted @ 2021-11-12 08:19
高山柴郡
阅读(319)
推荐(0)
摘要:
console.dir显示数据结构传递的是分割符split支持正则表达式var n6=str.split(/ [ao]/)console.log(n6) join是将数组转换成字符串传的东西是连接符 区别省略分割分割每一个使用limit从第几个把每一个分割使用一个字符做分割符 flat递归 join
阅读全文
posted @ 2021-11-11 11:32
高山柴郡
阅读(360)
推荐(0)