摘要: 1.arr.push() 从后面添加元素,返回值为添加完后的数组的长度 let arr = [1,2,3,4,5] console.log(arr.push(5)) // 6 console.log(arr) // [1,2,3,4,5,5] 2 arr.pop() 从后面删除元素,只能是一个,返回 阅读全文
posted @ 2021-12-03 14:08 webjsking 阅读(59) 评论(0) 推荐(0)
摘要: 需求H5项目在微信关闭时需要向后端传一些数据 methods:{ //页面,关闭,发送请求 pagehideHander() { //将数据转换成JSON let info = JSON.stringify(this.info) const xhr = new XMLHttpRequest()// 阅读全文
posted @ 2021-12-18 13:40 webjsking 阅读(180) 评论(0) 推荐(0)