1//隐藏密码2hidePassword(val) {3let str =''4for(let i =0; i < val.length; i++) {5if(i ==0) {6consts = val.slice(i,1)7str =str.concat(s)8}elseif(i == val.length -1) {9consts = val.slice(i -1, i)10str =str.concat(s)11}else{12str = str.concat('*')13}14...