摘要: 阅读全文
posted @ 2019-04-26 15:59 红尘陌上,独自行走 阅读(460) 评论(0) 推荐(0) 编辑
摘要: javascript中的每一个Function对象都有一个apply()和一个call()方法,它们的语法分别是: /*apply()方法*/ function.apply(thisObj[, argArray]) apply: 调用一个对象的一个方法,用另一个对象替换当前对象。 例如: B.app 阅读全文
posted @ 2018-12-13 16:55 红尘陌上,独自行走 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 四://原型式继承 //原型是继承 function inheritObject(o){ //声明一个过度函数对象 function F(){} //过渡对象的原型继承父对象 F.prototype = o; //返回过度对象的一个实例,该实例的原型继承了父对象 return new F(); } 阅读全文
posted @ 2018-11-07 13:55 红尘陌上,独自行走 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 一.子类的原型继承 -- 类式继承 // 声明父类 function SuperClass(){ this.superValue = true } //为父类添加共有方法 SuperClass.prototype.getSuperValue = function(){ return this.sup 阅读全文
posted @ 2018-11-07 13:03 红尘陌上,独自行走 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 面向对象编程就是将你的需求抽象成一个对象,然后针对这个对象分析器特征(属性)与动作(方法)。这个对象我们称之为类。 面向对象编程思想其中有一个特点就是封装。 在ES5中创建一个类很容易,首先声明一个函数保存在一个变量里(变量名首字母大写),在这个函数(类)的内部通过this(函数内部自带的一个变量, 阅读全文
posted @ 2018-11-06 14:13 红尘陌上,独自行走 阅读(198) 评论(0) 推荐(0) 编辑
摘要: function test(){ let a = 1 for (let i =0;i<3;i++){ console.log(i) //1,2 } console.log(i) //error console.log(a) const app = 1 const data = { //对象是引用类型 阅读全文
posted @ 2018-10-24 10:22 红尘陌上,独自行走 阅读(122) 评论(0) 推荐(0) 编辑
摘要: git源码地址: https://github.com/songkangle/weixin_node 小程序页面 数据库 user表 dream表 node的express框架index.js var express = require('express');var http= require("h 阅读全文
posted @ 2018-10-12 15:04 红尘陌上,独自行走 阅读(2037) 评论(0) 推荐(0) 编辑
摘要: git clone 地址 //拉取项目 git checkout 分支名 //创建分支 git branch 分支名 //切换分支 git branch -d 分支名 //上传分支 git add . //添加上传 git commit -m "提交的说明" //提交说明 git push -u o 阅读全文
posted @ 2018-10-11 16:26 红尘陌上,独自行走 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 一、校验数字的表达式 数字:^[0-9]*$ n位的数字:^\d{n}$ 至少n位的数字:^\d{n,}$ m-n位的数字:^\d{m,n}$ 零和非零开头的数字:^(0|[1-9][0-9]*)$ 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9]{1,2})?$ 带1- 阅读全文
posted @ 2018-10-09 14:49 红尘陌上,独自行走 阅读(142) 评论(0) 推荐(0) 编辑
摘要: wxml <!--pages/scroll.wxml--> <scroll-view scroll-y="true" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-top="{{ scro 阅读全文
posted @ 2018-09-29 18:21 红尘陌上,独自行走 阅读(329) 评论(0) 推荐(0) 编辑