摘要: 【前言】 最近在捣鼓各种插件各种框架,发现这个ECharts还是比较不错的,文档也挺全的,还是中文的,给大家推荐一下。 这篇文章是零基础入门ECharts图表的教程,先简单介绍一下吧,可能有人还不知道这个东西。 【简介】 ECharts,缩写来自Enterprise Charts,商业级数据图表,一 阅读全文
posted @ 2018-03-29 15:52 白纱茗-度C 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 前端数据可视化插件有很多,但我用过的只有Highcharts(https://www.hcharts.cn/)、Echarts(http://echarts.baidu.com/)和D3(https://d3js.org/), Web开发过程中选择使用哪一个插件是很重要的问题。就我个人而言,一般会从 阅读全文
posted @ 2018-03-29 15:49 白纱茗-度C 阅读(1688) 评论(0) 推荐(0) 编辑
摘要: 【javascript来获取当前页面的url网址信息】: 举例:URL,然后获得它的各个组成部分 http://i.cnblogs.com/EditPosts.aspx?opt=1 1、window.location.href(设置或获取整个 URL 为字符串) var test = window. 阅读全文
posted @ 2018-03-29 12:23 白纱茗-度C 阅读(346) 评论(0) 推荐(0) 编辑
摘要: function isEmail(str) { var re = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; if(str.indexOf('@') < 0){ return false; } return re.test(s... 阅读全文
posted @ 2018-03-29 12:20 白纱茗-度C 阅读(112) 评论(0) 推荐(0) 编辑
摘要: font_width(); $(window).on("resize", function(){ font_width(); }); function font_width (){ var clientWidth = document.documentElement ? document.documentElement.clientWidth : document.body; if ... 阅读全文
posted @ 2018-03-29 12:19 白纱茗-度C 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Jquery的获取元素标签名称的方法: 1、$( this ).get(0).tagName 2、$( this )[0].tagName 3、$( this ).prop("tagName") 4、$( this ).prop("nodeName") 阅读全文
posted @ 2018-03-29 12:19 白纱茗-度C 阅读(500) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-03-29 12:18 白纱茗-度C 阅读(156) 评论(0) 推荐(0) 编辑
摘要: <!-- HTML5 shim for IE8 support of HTML5 elements --> <!-- [if lt IE 9]> <script src="js/respond.min.js"></script>> <script src="js/html5shiv.js"></sc 阅读全文
posted @ 2018-03-29 12:17 白纱茗-度C 阅读(95) 评论(0) 推荐(0) 编辑
摘要: //提取cookie中的值 CloudShareCommon.prototype.getCookie = function (name) { var cookieStr = document.cookie; if (cookieStr.length > 0) { var cookieArr = cookieStr.split(";"); //将cookie信息转... 阅读全文
posted @ 2018-03-29 12:16 白纱茗-度C 阅读(175) 评论(0) 推荐(0) 编辑
摘要: //创建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 阅读(286) 评论(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 阅读(3327) 评论(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 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 后面的项目发现,还有两个坑,需要注意下: ·本文的解决方案的核心是利用了 微信/易信 在ready的时候会有个 WeixinJSBridgeReady/YixinJSBridgeReady事件,通过监听这个事件来触发的。那有个坑就是 如果微信已经ready了,但还没执行到你监听这个ready事件的代 阅读全文
posted @ 2018-03-29 11:48 白纱茗-度C 阅读(267) 评论(0) 推荐(0) 编辑