2020年6月3日
摘要: // 模拟实现call方法 Function.prototype.call2 = function (context) { var context = context || window; context.fn = this; var args = []; for(var i = 1, len = 阅读全文
posted @ 2020-06-03 16:12 carry,carry 阅读(296) 评论(0) 推荐(0) 编辑
  2020年5月20日
摘要: // 被观察者 class Subject{ // 定义一个对象 constructor(){ // 构造器 可以实例一个对象 this.subs = [] // 存储观察者 } addsub(sub){ // 添加观察者 this.subs.push(sub) } notify(food){ // 阅读全文
posted @ 2020-05-20 20:00 carry,carry 阅读(138) 评论(0) 推荐(1) 编辑
  2020年5月11日
摘要: Node: js在服务端的一个运行环境 node框架:express koa egg (a56爆大奖在线娱乐采用express) express: 是基于node的一个web框架 restful api:是目前流行的api设计规范,用于web数据接口设计 特点:动词+宾语 请求方式:Get, 地址: /api/ar 阅读全文
posted @ 2020-05-11 14:42 carry,carry 阅读(402) 评论(0) 推荐(1) 编辑
  2020年5月9日
摘要: http协议:超广本传输协议 特点: 短连接 请求完成后就断开 无状态 对于事务处理无记忆能力 媒体独立 客户端要指定适合的传输内容类型,如json http 是建立在tcp/ip协议之上的应用层协议 H5新增的: 长连接 websocket 双向通信 http主要三部分: 请求行(url),请求头 阅读全文
posted @ 2020-05-09 17:51 carry,carry 阅读(504) 评论(1) 推荐(1) 编辑
  2019年11月5日
摘要: // 扩展运算符 const fue = ['agg','apple','origen'] console.log(...fue) // for of const arr = ['a','b','c','d'] const obj = [{name:'a'},{name:'b'},{name:"c" 阅读全文
posted @ 2019-11-05 17:42 carry,carry 阅读(358) 评论(0) 推荐(0) 编辑
  2019年10月13日
摘要: 1.v-on / @ 2.v-show 适用于比较频繁的操作 显示隐藏 / v-if DOM元素的删除/销毁,渲染 3.v-for 遍历数组: v-for = "(v,i) in arr" v数组的每一项(值/value), i为索引 :key= " i " 为了防止浏览器从缓存中拿取数据,key最 阅读全文
posted @ 2019-10-13 21:35 carry,carry 阅读(183) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2019-10-13 11:21 carry,carry 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1.<meta> 元素可提供有关页面的元信息(meta-information),比如针对搜索引擎和更新频度的描述和关键词。<meta> 标签位于文档的头部,不包含任何内容。 2.<meta> 标签的属性定义了与文档相关联的名称/值对。 3.常见的代码: <meta http-equiv="cont 阅读全文
posted @ 2019-10-13 10:12 carry,carry 阅读(253) 评论(0) 推荐(1) 编辑
  2019年10月8日
摘要: //普通对象 //函数对象(有原型 prototy 的属性) //原型的应用 继承 function Amial(){ this.type = '小于' } function cat(name){ this.name = name } cat.prototype = new Amial() var cat1 = new cat('小张') console.log(cat1.name,cat1.ty 阅读全文
posted @ 2019-10-08 13:49 carry,carry 阅读(149) 评论(0) 推荐(1) 编辑
  2019年10月5日
摘要: js数据类型分为两大类:一 值类型 二 引用类型 一 值类型 string number boolean null undefined eg: var str = 'aaa' var num = 123 var bool = true var n = null var und = undefined 阅读全文
posted @ 2019-10-05 15:25 carry,carry 阅读(183) 评论(0) 推荐(0) 编辑