zoukankan      html  css  js  c++  java
  • 浏览器自动记住密码后,出现下拉框显示选择对应账户密码,如何去掉

     v-on:input="changeInputValue(submitinfo.password)"

    auto-complete="new-password"
    注意现在这块这个input框已经不是密码框而是一个文本框,因为密码框记住账号的功能是浏览器自带的功能,只能用这种掩盖得方式解决这个问题
    changeInputValue(strVal){
          //如果点击了删除得按钮,则清空realOldPassword
          if(strVal === ""){
            this.realOldPassword = "";
          }
          //js将一个字符串里所有得*去掉
          let str = strVal.replace(/[*]/g,"");
          if(str === ""){//如果输入内容是空则删除以为
            this.realOldPassword=this.realOldPassword.slice(0,this.realOldPassword.length-1);
          }else{//否则增加一位
            this.realOldPassword+=strVal.substr(strVal.length-1,1); //获取最后一个字符加到到str,因为除了最后一个字符,其他的已经为*
          }
          this.submitinfo.password=strVal.replace(/./g,'*') //输入框内容全部变为*
          // console.log(this.realOldPassword,111)
          // console.log(this.submitinfo.password,222)
        },

       

     
     
  • 相关阅读:
    newCachedThreadPool无上限线程池使用
    newFixedThreadPool固定线程使用
    java定时器
    http文件上传/下载
    ThreadPoolExecutor线程池
    阻塞队列
    非阻塞队列
    IO文件夹拷贝(文件内含有文件和文件夹)
    MD5加密
    web.xml文件的作用
  • 原文地址:https://www.cnblogs.com/web-aqin/p/14943227.html
Copyright © 2011-2022 走看看