Input type Password with autocomplete enabled. val () value

I have an input field:

<input type="password" name="password" id="password" autocomplete="on" required="" class="ui-state-valid">

      

When the page is initially loaded and autocomplete occurs, $ ("# password"). val () returns the character "". Even when there is a value entered by autocomplete.

This causes problems with the custom placeholder.

I need to know why the value is empty. I have other input fields on the page that work fine with autocomplete.

+3


source to share


1 answer


As of Internet Explorer 11, the autocomplete property is no longer supported for input types = password fields.

The autocomplete feature is highlighted when using autocomplete in HTML Forms Overview.

If autocomplete is enabled, suggestions are provided for the value of the text box. The suggested values ​​are display values ​​based on the name of the attribute or the vCard specified by the vcard_name attribute.

If autocomplete is disabled, values ​​are not saved and no values ​​are suggested.

Values ​​in input type = password items can be matched for autocomplete; however, the ability to save this information can be disabled in the browser and the user will be prompted to confirm before the value is saved.

The information provided by the autocomplete function is not affected by the object model and is not displayed on the web page until the user selects one of the suggestions as the value for the text box.



ref: - here

+2


source







All Articles