随笔分类 -  js

摘要:console.log(Array.from('foo')); // expected output: Array ["f", "o", "o"] console.log(Array.from([1, 2, 3], x => x + x)); // expected output: Array [2 阅读全文
posted @ 2020-07-14 09:55 lishidefengchen 编辑
摘要:const formatDate = (timestamp: number) => { const time = new Date((timestamp - 1) * 24 * 3600000 + 1); time.setFullYear(time.getFullYear() - 70); cons 阅读全文
posted @ 2020-06-26 23:56 lishidefengchen 编辑
摘要:this.regionsList = result.sort((a, b) => a.warehouseAreaCode.localeCompare(b.warehouseAreaCode)); result--对象数组(集合) 阅读全文
posted @ 2020-02-06 11:52 lishidefengchen 编辑
摘要:self._entityService .getAll() .pipe( finalize(() => { if (self.sheet && self.sheet.length > 0) { self._xlsxServ... 阅读全文
posted @ 2019-04-15 10:30 lishidefengchen 编辑
摘要://验证非负实数,保留2位小数,不采取四舍五入,不能去掉无效零,obj是this //示例: function IWS_CheckDecimal(obj) { var temp = /^\d+\.?\d{0,2}$/; if (temp.test(obj.value)) { } else { obj.value = obj.value.substr(0, ... 阅读全文
posted @ 2016-06-29 18:09 lishidefengchen 编辑
摘要:原文地址:http://www.jquery001.com/jquery-image-preview.html 阅读全文
posted @ 2016-04-20 11:08 lishidefengchen 编辑
摘要:$('#someTextBox').keypress(function(event){ var keycode = (event.keyCode ? event.keyCode : event.which); if(keycode == '13'){ alert('You pressed a "enter" key in textbox'); ... 阅读全文
posted @ 2016-03-25 12:43 lishidefengchen 编辑
摘要:break----用return false; continue --用return ture; 阅读全文
posted @ 2015-10-21 14:16 lishidefengchen 编辑
摘要://获取url中的参数 function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var... 阅读全文
posted @ 2015-05-18 15:46 lishidefengchen 编辑

点击右上角即可分享
微信分享提示