摘要: window.addEventListener('pageshow', function(e) {var da = history.length;console.log(history.length);//监听history返回的是数字getData();}); 阅读全文
posted @ 2019-06-10 11:51 影思密达ing 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 例子1:把data1数组变成data2类型的数组data1:Array(5)0:{name: "上班", value: "1"}1:{name: "下班", value: "1"}2:{name: "迟到", value: "1"}3:{name: "早退", value: "2"}4:{name: 阅读全文
posted @ 2019-06-10 11:50 影思密达ing 阅读(111) 评论(0) 推荐(0) 编辑
摘要: var several=[];$.ajax({type: "get",url: "/js/race.json",async:false, //是否为异步请求,true为异步请求,false为同步请求success: function(data) {console.log(data);dl=data. 阅读全文
posted @ 2019-06-10 11:49 影思密达ing 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 效果是个导航轮播视图层<swiper indicator-dots="true" autoplay="true" duration="1000" bindchange="listenSwiper" ><block wx:for="{{Arr}}" wx:for-index="idx" wx:key= 阅读全文
posted @ 2019-06-10 11:48 影思密达ing 阅读(353) 评论(0) 推荐(0) 编辑
摘要: var a = [];for (var i = 0; i < 10; i++) {a[i] = (function(j){return function(){ console.log(j); };})(i);}a[7](); 关于闭包的varfunction createFunctions(){va 阅读全文
posted @ 2019-06-10 11:48 影思密达ing 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1》小程序ios页面晃动问题,上下晃动是因为机子本身问题,左右问题可以解决.container{padding-bottom: 0;background-repeat: no-repeat;background-size: 100% auto;background-position: bottom 阅读全文
posted @ 2019-06-10 11:47 影思密达ing 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 实际情形是course creat(a) 和creat2(b)a页面点击按钮跳到b页面,b页面类似于提交表单,提交后返回a页面,a页面则多了一条数据用来展示以及删除,然后a页面再点按钮...此过程可以重复b页面var obj = new Object();obj.week = week;obj.ti 阅读全文
posted @ 2019-06-10 11:46 影思密达ing 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 先来看:var arr = [1,2,3,4,5,undefined,7,8,9,10,11,12,13,14];var len = arr.length;console.log(len);console.log(arr);console.log(arr[5]);if(arr[5]){console 阅读全文
posted @ 2019-06-10 11:44 影思密达ing 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 这篇大佬用图文分析详解vue2.0里面的生命周期<script src="https://cdn.bootcss.com/vue/2.4.2/vue.js"></script>;页面中渲染的优先值:所以综合排名优先级:render函数选项 > template选项 > outer HTML. htt 阅读全文
posted @ 2019-06-10 11:42 影思密达ing 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 初始化DOM求高度是有BUG的,只能第一次渲染后求,不加延迟有时候求不到值,加了延迟第一面效果不好 阅读全文
posted @ 2019-06-10 11:41 影思密达ing 阅读(555) 评论(0) 推荐(0) 编辑