Array.prototype.filter filter() 方法创建一个新数组, 其包含通过所提供函数实现的测试的所有元素。 语法 var newArray = arr.filter(callback(element[, index[, array]])[, thisArg]) 参数 callb ...
分类:
Web程序 时间:
2021-05-25 18:03:20
阅读次数:
0
1、安装node.js 验证是否安装成功:node -v 2、安装npm 验证是否安装成功:npm -v 3、下载cnpm镜像: npm install cnpm -g --registry=https://registry.npm.taobao.org 验证安装成功:打印出+ cnpm@6.2.0 ...
分类:
其他好文 时间:
2021-05-25 18:03:05
阅读次数:
0
let date = new Date() for (let m = 1; m < 13; m++) { let num = new Date(date.getFullYear(), m, 0).getDate(); for (let i = 1; i < num + 1; i++) { //再把天 ...
分类:
Web程序 时间:
2021-05-25 17:54:29
阅读次数:
0
一、创建三个文件放在项目文件夹src下面的API文件夹下: 分别是:apiList.js、index.js、request.js 二、文件内容作用: (1)apiList.js 用于存放接口的地址信息(如下所示:) (2)index.js 封装接口,可全局使用this.$api('...'),后面举 ...
分类:
其他好文 时间:
2021-05-25 17:38:22
阅读次数:
0
$(document).ready(function () { function checkKey(evt) { var keyID = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode); alert(ke ...
分类:
Web程序 时间:
2021-05-24 17:17:10
阅读次数:
0
1、项目文件下src文件夹=>request文件夹=>http.js和api.js http.js // 封装拦截器 // 封装get post // 1.引入模块 import axios from "axios" import qs from "qs" import Vue from "vue" ...
分类:
移动开发 时间:
2021-05-24 17:02:36
阅读次数:
0
1.实现前后端数据交互,先启动后端 2.配置代理 在你的项目目录下创建一个文件,叫 vue.config.js: module.exports = { // 部署应用时的基本 URL publicPath:"", // build 时构建文件的目录 outputDir: 'dist', // bui ...
分类:
其他好文 时间:
2021-05-24 16:59:08
阅读次数:
0
如下图,这种一个元素由两个标签控制的,用js改值时需要两个标签的属性值都改 改值代码 js_code = 'a = document.getElementById("lostdate");' \ 'a.removeAttribute("readonly");' \ 'a.value = "2021- ...
分类:
编程语言 时间:
2021-05-24 16:17:00
阅读次数:
0
本人用微信公众号开发时,使用的html5页面,页面使用js或css文件方法修改了,但是更新到微信公众号上面总是看不到效果,后面在网上找了原因,发现微信是使用内置浏览器,会自动帮我们缓存数据,导致更新不及时或没有效果。 经过网上搜索清除微信内置浏览器缓存方法,具体如下 1)使用链接 https://d ...
分类:
微信 时间:
2021-05-24 16:05:43
阅读次数:
0
reduce语法 array.reduce(function(total, currentValue, currentIndex, arr), initialValue); 参数描述 total 必需。初始值, 或者计算结束后的返回值。 currentValue 必需。当前元素 currentInd ...
分类:
Web程序 时间:
2021-05-24 16:04:18
阅读次数:
0