jQuery change input type

后端 未结 10 731
终归单人心
终归单人心 2020-12-01 04:24

Trying to change input type attribute from password to text.

$(\'.form\').find(\'input:password\').attr({type:\"text\"         


        
10条回答
  •  一生所求
    2020-12-01 05:02

    function passShowHide(){
      if( $("#YourCheckBoxID").prop('checked') ){
        document.getElementById("EnterPass").attributes["type"].value = "text";
      }
      else{
        document.getElementById("EnterPass").attributes["type"].value="password";}
    

提交回复
热议问题