随笔分类 -  js

上一页 1 ··· 4 5 6 7 8 9 10 下一页
摘要:function getobjArr (data) { var result = []; data.HELMET.system = '系统分类' // console.log(data) $.each(data.HELMET, function (index_h, e... 阅读全文
posted @ 2018-01-12 13:01 abcByme 阅读(3348) 评论(0) 推荐(0)
摘要:var arrsAll = ['1','1','1']; console.log('isAllEqual',isAllEqual(arrsAll)); //true 阅读全文
posted @ 2018-01-12 12:27 abcByme 阅读(3802) 评论(0) 推荐(0)
摘要:var ary = new Array("111", "22", "33", "111"); console.log(arrHasvalue(ary)); //true 阅读全文
posted @ 2018-01-11 22:48 abcByme 阅读(1866) 评论(3) 推荐(0)
摘要:var arrs = ['1','2','3']; console.log(arrHasValue(1,arrs)); //true 阅读全文
posted @ 2018-01-11 22:25 abcByme 阅读(2580) 评论(0) 推荐(0)
摘要://金额处理 var number = 1234567.35; if (parseInt(number) == number) { var money = number.toString().split(''); var unit = money[money.length - 1]; var decade = money[m... 阅读全文
posted @ 2018-01-11 14:44 abcByme 阅读(730) 评论(0) 推荐(0)
摘要:console.log('fmoney',fmoney(100.12243, 2)) //100.12 阅读全文
posted @ 2018-01-11 14:29 abcByme 阅读(677) 评论(0) 推荐(0)
摘要:console.log('obj',obj) 阅读全文
posted @ 2018-01-11 14:23 abcByme 阅读(10885) 评论(0) 推荐(0)
摘要:console.log(smalltoBIG(43533534.78)); 阅读全文
posted @ 2018-01-11 13:03 abcByme 阅读(1254) 评论(0) 推荐(0)
摘要:来自:SangSir 链接:https://segmentfault.com/a/1190000012673854 原文:https://www.sitepoint.com/shorthand-javascript-techniques/ 1.三元操作符 当想写 if...else 语句时,使用三元 阅读全文
posted @ 2018-01-10 14:24 abcByme 阅读(2094) 评论(0) 推荐(1)
摘要:ajaxJson('POST', url, JSON.stringify(param), function(err, result){ //result or rsp // if(SUCCESS){ //....... }else{ //....... } }); ————————————————— 阅读全文
posted @ 2018-01-04 10:14 abcByme 阅读(1184) 评论(0) 推荐(0)
摘要:转自:http://www.cnblogs.com/chiname/articles/216517.html(侵删) /* * 方法:Array.removeAt(Index) * 功能:删除数组元素. * 参数:Index删除元素的下标. * 返回:在原数组上修改数组 */ /* * 方法:Arr 阅读全文
posted @ 2018-01-03 18:05 abcByme 阅读(1182) 评论(0) 推荐(0)
摘要:function formatDate(date,fmt) { if(/(y+)/.test(fmt)){ fmt = fmt.replace(RegExp.$1,(date.getFullYear()+'').substr(4-RegExp.$1.length)); } let o = { 'M+ 阅读全文
posted @ 2017-12-27 19:49 abcByme 阅读(11378) 评论(0) 推荐(0)
摘要:1、冒泡排序 2、快速排序 3、二路归并 字符串操作 1、判断回文字符串 2、翻转字符串 思路一:反向遍历字符串 思路二:转化成array操作 3、生成指定长度随机字符串 4、统计字符串中次数最多字母 数组操作 1、数组去重 2、数组中最大差值 其他常见算法 1、阶乘 非递归实现 递归实现 2、生成 阅读全文
posted @ 2017-12-26 10:44 abcByme 阅读(870) 评论(0) 推荐(2)
摘要:当前,数据可视化已经成为数据科学领域非常重要的一部分。不同网络系统中产生的数据,都需要经过适当的可视化处理,以便更好的呈现给用户读取和分析。 对任何一个组织来说,如果能够充分的获取数据、可视化数据和分析数据,那么就能很大程度上帮助了解数据产生的深层次原因,以便据此做出正确的决定。 对于前端开发人员来 阅读全文
posted @ 2017-12-25 09:34 abcByme 阅读(3424) 评论(1) 推荐(0)
摘要:冒泡排序 快速排序 去重 查找字符串中最多的值 阅读全文
posted @ 2017-12-20 16:38 abcByme 阅读(577) 评论(0) 推荐(0)
摘要:原文:https://github.com/Chalarangelo/30-seconds-of-code#anagrams-of-string-with-duplicates 作者:Chalarangelo 译者:IT168 www.toutiao.com/i6498962961288135182 阅读全文
posted @ 2017-12-19 15:24 abcByme 阅读(466) 评论(0) 推荐(0)
摘要:// 提取特殊字符串长度(scrstr 源字符串 armstr 特殊字符) getStrCount: function(scrstr, armstr) { var count = 0; while (scrstr.indexOf(armstr) >= 1) { scrstr = scrstr.replace(armstr, "") count++;... 阅读全文
posted @ 2017-12-05 19:30 abcByme 阅读(869) 评论(0) 推荐(0)
摘要://两数组去除重复数值 mergeArray: function(arr1, arr2) { for (var i = 0; i < arr1.length; i++) { for (var j = 0; j < arr2.length; j++) { if (arr1[i] === arr2[j]) { arr1.... 阅读全文
posted @ 2017-12-05 18:14 abcByme 阅读(4273) 评论(0) 推荐(0)
摘要:getobjs(obj,key,value) 阅读全文
posted @ 2017-12-01 10:43 abcByme 阅读(1664) 评论(2) 推荐(0)
摘要:formatDuring: function(mss) { var days = parseInt(mss / (1000 * 60 * 60 * 24)); var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = parseInt((mss % (1... 阅读全文
posted @ 2017-11-16 15:47 abcByme 阅读(1856) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 下一页