摘要: 目录 fs 图片的复制与粘贴 读文件(fs.readFile) 写文件(fs.writeFile) 打开文件(fs.open) 给文件添加数据(fs.appendFile) 删除文件(fs.unlink) 创建文件(fs.open) 删除文件夹(fs.rmdir) 创建文件夹(fs.mkdir) 文 阅读全文
posted @ 2018-07-17 16:47 lijun8637 阅读(1274) 评论(0) 推荐(0) 编辑
摘要: /**生成一个随机数**/ randomNum(min, max) { return Math.floor(Math.random() * (max - min) + min); }, /**生成一个随机色**/ randomColor(min, max) { var r = this.random 阅读全文
posted @ 2018-06-23 09:56 lijun8637 阅读(276) 评论(0) 推荐(0) 编辑
摘要: //日期格式化function datesFormat(txt){ Date.prototype.format = function(fmt) { var o = { "M+" : this.getMonth()+1, //月份 "d+" : this.getDate(), //日 "h+" : t 阅读全文
posted @ 2018-06-23 09:38 lijun8637 阅读(264) 评论(0) 推荐(0) 编辑
摘要: NodeJS适合运用在高并发、I/O密集、少量业务逻辑的场景。 node.js 为异步而生,这一点毫无疑问,但是在 CPU 和内存发面,要远远落后于 C/C++ 和 Java。特别是对于海量请求的场景,CPU 飙高,内存 GC 缓慢居高不下 来源:https://www.zhihu.com/ques 阅读全文
posted @ 2018-01-27 15:22 lijun8637 阅读(22742) 评论(0) 推荐(2) 编辑
摘要: 一、事件定义及分类 1. click事件 单击事件,类似于PC端的click,但在移动端中,连续click的触发有200ms ~ 300ms的延迟 2. touch类事件 触摸事件,有touchstart touchmove touchend touchcancel 四种之分 touchstart: 阅读全文
posted @ 2018-01-25 15:54 lijun8637 阅读(769) 评论(0) 推荐(0) 编辑
摘要: /*var str = 'this is test string <img src="http:yourweb.com/test.jpg" width="50" > 123 and the end <img src="所有地址也能匹配.jpg" /> 33! <img src="/uploads/a 阅读全文
posted @ 2018-01-12 09:57 lijun8637 阅读(635) 评论(0) 推荐(0) 编辑
摘要: 前言 vscode是一款跨平台的代码编辑器,她轻量、美观、一致、功能完整,自带完美git支持,非常适合前端同学使用。下面总结下我对于这个软件的使用技巧,希望对大家有帮助。 快捷键 注意:当下列快捷键不起作用时,请考虑是否是其他软件已经占用了快捷键,如输入法、聊天软件等 vscode内置了emmet, 阅读全文
posted @ 2017-11-30 09:49 lijun8637 阅读(1576) 评论(0) 推荐(0) 编辑
摘要: Number()、parseInt()、parseFloat()的区别: Number()的强制类型转换与parseInt()和parseFloat()方法的处理方式相似,只是它转换的是整个值,而不是部分值。parseInt()和parseFloat()方法只转换第一个无效字符之前的字符串。如“3. 阅读全文
posted @ 2017-11-01 18:43 lijun8637 阅读(170) 评论(0) 推荐(0) 编辑
摘要: let arr =[{},{}]; let str = '用户id,手机,卡号,昵称,姓名,年龄,性别,身高cm,体重kg'; for(let i=0; i<arr.length; i++){ str += "\n"+ arr[i].userId +','+ arr[i].account +','+ 阅读全文
posted @ 2017-10-25 19:01 lijun8637 阅读(121) 评论(0) 推荐(0) 编辑
摘要: <!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]--><!--[if IE]> 所有的IE可识别 <![endif]--><!--[if IE 6]> 仅IE6可识别 <![endif]--><!--[if lt IE 6]> IE6以及IE6以下版本可识别 <![ 阅读全文
posted @ 2017-10-18 12:22 lijun8637 阅读(213) 评论(0) 推荐(0) 编辑