08 2022 档案
摘要:首先第一步是下载微信开发者工具,这点可在官网看有详细介绍. 一.创建项目 在这里使用的是javascript- 基础模板 二.小程序入口app.json 重点介绍下文件的入口文件 app.json,在pages写下路径即可以直接创建文件夹以及对应的js json wxml wxss 后缀页面 { "
阅读全文
摘要:call, apply, bind 主要实现的功能是改变this的指向. 在正常情况下 console.log(this) 输出的内容是 window 对象 第一个call函数 <script> // 改变函数内this指向 js提供了三种方法 call() apply() bind() var o
阅读全文
摘要:Webform 是 MVC的基础 一个webform就有两个文件 一个是前端代码, 一个是处理服务器代码 由于webform 页面加载效果对比ASP.net MVC慢了许多, ASP.net MVC MVC模型是利用视图层去访问控制器,再有控制器通过model去访问数据库 在mvc在新建完项目需要增
阅读全文
摘要:extends用法演示 <script> class Father{ constructor(x, y){ this.x = x; this.y = y; } sum(){ console.log(this.x + this.y) } } class Son extends Father{ cons
阅读全文
摘要:原型: <script> // 构造函数 function Star(uname, age){ this.uname = uname; this.age = age; this.dance = function(){ console.log("跳舞"); } } Star.prototype.sin
阅读全文