摘要: html{ -webkit-filter: grayscale(100%); -moz-filter:grayscale(100%); -ms-filter: grayscale(100%); -mo-filter:grayscale(100%); filter:grayscale(100%); f 阅读全文
posted @ 2022-12-03 19:56 MetX 阅读(684) 评论(0) 推荐(0)
摘要: // 移除数组arr中的所有值与item相等的元素,直接给定的arr数组上进行操作,并将结果返回输入 function removeWithoutCopy(arr,item){ for(let i = 0;i<arr.length;i++){ if(arr[i] item){ arr.splice( 阅读全文
posted @ 2022-12-03 18:34 MetX 阅读(71) 评论(0) 推荐(0)
摘要: //返回数组的格式为key:value的形式不打印原型上的属性 var C = function(){ this.foo='bar' this.baz = 'bim' } C.prototype.bop ='bip' iterate(new C()) function iterate(obj){ c 阅读全文
posted @ 2022-12-03 18:16 MetX 阅读(30) 评论(0) 推荐(0)
摘要: socket.io在node中使用,首先安装express,socket.io,为了方便起见还安装了nodemon,它可以帮我们快速启动js文件,配置如下: 效果展示如下: 阅读全文
posted @ 2022-12-03 02:04 MetX 阅读(74) 评论(0) 推荐(0)