“Show password as text” control

后端 未结 7 1058
花落未央
花落未央 2021-01-05 03:21

I have a usual login form consisting of two input fields, one for login, one for password. I am currently trying to add a control that will show entered password as plain te

7条回答
  •  生来不讨喜
    2021-01-05 03:54

    There is no any possibility to show autofilled password for security reasons. Anyone could see your password on your computer for this page if this is possible.

    You have to deal with following for complete solution:

    • javascript is not allowed - then you should not display choose password checkbox
    • autocomplete is turned on - as I wrote, you're not able to show password filled this way. Eaighter switch off autocomplete or hide show password until user re-type password.

    Autocomplete switch off by this jQuery

    $('input').attr('autocomplete', 'off');
    

    For adding checkbox on the fly you can use following jquery-showPassword plugin available at http://www.cuptech.eu/jquery-plugins/

提交回复
热议问题