随笔分类 -  JS

摘要:.filter: https://blog.csdn.net/weixin_30784945/article/details/95575670 Array.prototype.myfilter = function(fun /*, thisp*/){ var len = this.length; i 阅读全文
posted @ 2020-03-06 13:37 yomi丶 阅读(1660) 评论(0) 推荐(0)
摘要:(Math.floor(num).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') 方法2: function fmoney(s, n) { n = n > 0 && n <= 20 ? n : 2; s = parseFloat((s + ""). 阅读全文
posted @ 2020-02-28 15:54 yomi丶 阅读(461) 评论(0) 推荐(0)
摘要:js没有replaceAll,所以用正则表达式查找所有匹配项("g"), .replace(new RegExp("\\.", "g"), "','") .在正则中要用\\转义 阅读全文
posted @ 2019-11-26 11:52 yomi丶 阅读(978) 评论(0) 推荐(0)
摘要:https://juejin.im/post/5aa1395c6fb9a028df223516 把小数转为整数,然后计算 https://www.html.cn/archives/7340 阅读全文
posted @ 2019-11-19 14:16 yomi丶 阅读(124) 评论(0) 推荐(0)
摘要:LevelEnum.filter(x=>x.Category=="水利工程") 注:IE不支持.filter 修改方法另见https://www.cnblogs.com/bjhblogs/p/12426107.html 阅读全文
posted @ 2019-11-05 10:18 yomi丶 阅读(4461) 评论(0) 推荐(1)
摘要:function changeMenu(menu_id){ frames[0].changeMenu(menu_id); } https://blog.csdn.net/caohaicheng/article/details/21285695?utm_source=blogxgwz1 阅读全文
posted @ 2019-07-22 18:04 yomi丶 阅读(254) 评论(0) 推荐(0)
摘要:.html()后加 $('#courseList').selectpicker('refresh'); $('#courseList').selectpicker('render'); 来源 阅读全文
posted @ 2019-04-02 16:46 yomi丶 阅读(2338) 评论(0) 推荐(0)
摘要:动态生成的元素,使用.on绑定事件,比如$(document).on("click",".divclick",function(){}) 阅读全文
posted @ 2019-03-15 13:59 yomi丶 阅读(1358) 评论(0) 推荐(0)