0
<input name="login" type="text" autocomplete="off" required>

<input name="password" type="password" required autocomplete="off">

and this is my js code for disable autocomplete

<script>
    $(document).ready(function(){
        $(':input').live('focus',function(){
            $(this).attr('autocomplete', 'off');
        });
        $('form').attr('autocomplete','off');
    });
</script>
mr_kiani
  • 33
  • 7

2 Answers2

0

You need to remove the : in your input selector. The below modification should help:

<script>
    $(document).ready(function(){
        $('input').on('click', function(){
            $(this).attr('autocomplete', 'off');
        });
    });
</script>

you can also use many other predefined functions like onkeyup, onkeydown etc.

Rotimi
  • 4,494
  • 4
  • 16
  • 27
Braj Ankit
  • 293
  • 1
  • 2
  • 16
0

you can disable this with simple html

put 2 false inputs before your input

<input class="hidden" type="text" style="display: none!important; visibility: hidden!important;" ></input>
<input class="hidden" type="password" style="display: none!important; visibility: hidden!important;" ></input>