摘要: Node.js中,除了直接运行脚本文件输出显示以外,还可以使用 -e 方法,如下所示: 装好Node.js后,打开cmd,直接输入以下即可。 node -e "console.log('Hello CSDN');" 原文链接:https://blog.csdn.net/u012138032/arti 阅读全文
posted @ 2021-01-15 14:41 tristam 阅读(425) 评论(0) 推荐(0) 编辑
摘要: getBoundingClientRect可以根据dom的四个边获得与window上边或左边的距离。 const obj = dom.getBoundingClientRect();obj.top = dom的上边距离window上边的距离;obj.bottom = dom的下边距离window上边 阅读全文
posted @ 2021-01-13 15:05 tristam 阅读(239) 评论(0) 推荐(0) 编辑
摘要: /\bv?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z-]+(?:\.[\da-z-]+)*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?\b/ 阅读全文
posted @ 2020-12-03 10:02 tristam 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 当我修改bug01的时候突然来了一个bug02,而且bug02优先级比bug01高,但是我不能提交未修改完的bug01代码,这个时候可以用git stash把bug01的修改放到暂存区,然后修改完bug02并push后,可以用git stash pop把上一个放到暂存区的代码版本合并到当前工作区代码 阅读全文
posted @ 2019-05-29 18:35 tristam 阅读(272) 评论(0) 推荐(0) 编辑
摘要: var str = " 1 sa s "; str = str.replace(/\s/g, ''); 阅读全文
posted @ 2019-05-23 15:33 tristam 阅读(641) 评论(0) 推荐(0) 编辑
摘要: function download(filename) { var oReq = new XMLHttpRequest(); oReq.open("GET", "", true); oReq.responseType = "blob"; oReq.onload = function (... 阅读全文
posted @ 2019-05-23 11:23 tristam 阅读(4059) 评论(0) 推荐(0) 编辑
摘要: @font-face{ font-family: '字体名称随便起'; src: url('../font/字体名称.eot'); src:url('../font/字体名称.woff') format('woff'), url('../font/字体名称.ttf') format('truetype'), url('../fo... 阅读全文
posted @ 2019-05-08 10:00 tristam 阅读(4926) 评论(0) 推荐(0) 编辑
摘要: 记得请求的responsType: 'blob' 阅读全文
posted @ 2019-03-20 11:28 tristam 阅读(1764) 评论(0) 推荐(0) 编辑
摘要: .doc application/msword .docx application/vnd.openxmlformats-officedocument.wordprocessingml.document .rtf application/rtf .xls application/vnd.ms-exc 阅读全文
posted @ 2019-03-20 11:27 tristam 阅读(852) 评论(0) 推荐(0) 编辑
摘要: 生成module和routing.module文件 阅读全文
posted @ 2019-03-19 16:03 tristam 阅读(284) 评论(0) 推荐(0) 编辑