jQuery change input type

后端 未结 10 602
终归单人心
终归单人心 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:12

    It's 2018 and jQuery does support this feature now. The following will work:

    $('.form').find('input:password').attr("type","text");
    

提交回复
热议问题