摘要: //创建cookie CloudShareCommon.prototype.setCookie = function (name, expireday) { var exp = new Date(); exp.setTime(exp.getTime() + expireday * 60 * 1000); //设置cookie的期限 document.cookie = na... 阅读全文
posted @ 2018-03-29 12:15 白纱茗-度C 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 【注意】:匹配任意字符—— [\d\D] 、 [\w\W] 、[\s\S] 、[^] 阅读全文
posted @ 2018-03-29 12:14 白纱茗-度C 阅读(522) 评论(0) 推荐(0) 编辑
摘要: git init →创建版本库 git add 文件名 →将文件提交到暂存区 git status →查看暂存区的状态 git commit -m "注释" → 提交文件到本地库 git reflog 文件名→查看版本号 git reset --hard HEAD^ →回退一个版本 git rese 阅读全文
posted @ 2018-03-29 12:12 白纱茗-度C 阅读(102) 评论(0) 推荐(0) 编辑
摘要: npm安装模块 【npm install xxx】 利用npm安装xxx模块到当前命令行所在的目录; 【npm install -g xxx】利用npm安装全局模块xxx; 本地安装时将模块写入package.json中 【npm install xxx】 安装但不写入package.json; 【 阅读全文
posted @ 2018-03-29 12:10 白纱茗-度C 阅读(111) 评论(0) 推荐(0) 编辑
摘要: function settime ($el,countdown) { if(countdown === 0){ $el.removeAttr('disabled') // $el.val('发送验证码').css('backgroundColor','#e70034') $el.val('获取验证码').css('backgroundColor','transpare... 阅读全文
posted @ 2018-03-29 12:05 白纱茗-度C 阅读(250) 评论(0) 推荐(0) 编辑
摘要: function endTime(value) { // value = '2017-08-15 14:20:00'; var val = value.replace(/-/g, "/"); var date1 = new Date(); //开始时间 var date2 = new Date(val); //结束时间 var mss = date1 - date2; //时... 阅读全文
posted @ 2018-03-29 12:01 白纱茗-度C 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Js获取当前日期时间及其它操作 var myDate = new Date(); myDate.getYear(); //获取当前年份(2位) myDate.getFullYear(); //获取完整的年份(4位,1970-????) myDate.getMonth(); //获取当前月份(0-11 阅读全文
posted @ 2018-03-29 12:00 白纱茗-度C 阅读(3324) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2018-03-29 11:57 白纱茗-度C 阅读(286) 评论(0) 推荐(0) 编辑
摘要: // js判断是微信、QQ内置浏览器打开页面 方法一:(微信官方js判断做法) var ua = navigator.userAgent.toLowerCase(); var isWeixin = ua.indexOf('micromessenger') != 1; if(isWeixin){ re 阅读全文
posted @ 2018-03-29 11:56 白纱茗-度C 阅读(161) 评论(0) 推荐(0) 编辑
摘要: https://github.com/Tencent/vConsole/blob/dev/README_CN.md 下载 vConsole 的最新版本。(不要直接下载 dev 分支下的 dist/vconsole.min.js) 或者使用 npm 安装: npm install vconsole 引 阅读全文
posted @ 2018-03-29 11:49 白纱茗-度C 阅读(369) 评论(0) 推荐(0) 编辑