0

I want to detect if user has changed the type of some input from <input type="password"> to <input type="text"> or else to put it again on <input type="password">.

The idea is to prevent the user from changing the type. Here is my idea or if you have something else Iam interested.

My code:

jQuery(('.input_class').attr('type').val()).live('change', function(){
        alert('the type is changed');
        jQuery('.input_class').prop('type', 'password');
});
prince
  • 103
  • 1
  • 1
  • 9
  • 1
    Possible duplicate of [change type of input field with jQuery](http://stackoverflow.com/questions/1544317/change-type-of-input-field-with-jquery) – Steven Johnston Mar 06 '17 at 15:14
  • it's not what i need thanks to remove a possible duplicate @Steven Johnston – prince Mar 06 '17 at 15:24

0 Answers0