<input type="password" name="" id="">可以这样写
<input type="text" onfocus="this.type='password'" name="" id="">