摘要: // 替换手机号中间四位 var str = '15912341234'; // 方法一 str.replace(/(\d{3})(\d{4})(\d{3})/, function($0, $1, $2, $3){ console.log($1+"****"+$3) }) // 方法二 str.re 阅读全文
posted @ 2019-05-28 18:52 北执666 阅读(517) 评论(0) 推荐(0) 编辑
摘要: var arr = ['a',1,2,3,'a',4,2,3,1,4,2,8,10,null,'a']; // 方法一 var newArr = [...new Set(arr)]; console.log(newArr); // 方法二 var newArr = arr.reduce( (prev 阅读全文
posted @ 2019-05-28 17:55 北执666 阅读(1497) 评论(0) 推荐(0) 编辑
摘要: <form name="form1" onsubmit="return foo()"> <input type="radio" name="radiogroup1"> <input type="radio" name="radiogroup1"> <input type="radio" name=" 阅读全文
posted @ 2019-05-28 17:44 北执666 阅读(3794) 评论(0) 推荐(0) 编辑
摘要: 1. cropper.js 在cropper.js中找到 getCroppedCanvas方法 在context.drawImage.apply上添加 var circle = { x: canvasWidth / 2, y: canvasHeight / 2, r: canvasWidth / 2 阅读全文
posted @ 2019-05-28 10:12 北执666 阅读(1408) 评论(0) 推荐(0) 编辑