Bladephp: Now with 7+ codeigniter, php, and laravel project 7+ php project From $18/Year From Rs. 1000/Year

How to Disable AutoComplete Form using jQuery

by
Category:jquery
jquery html
How to Disable AutoComplete Form using jQuery

Autocomplete attribute of HTML is use to fetch previous input values in input fields. Almost all browsers supports autocomplete attribute, by default this attribute is “on” in html, so in this tutorial i will show How to disable autocomplete form using jquery. You may also like How to Autocomplete Textbox Using jQuery,PHP and MySQL and Live Search in php with Ajax and Mysql

HTML and jQuery Code

<html>
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script type="text/javascript">
            function disable_autocomplete()
            {
                $("#form1").attr('autocomplete', 'off');
            }
        </script>
    </head>
    <body>
        <div id="wrapper">

            <form id="form1">
                <input type="text" name="text" placeholder="Enter Text">
                <input type="submit" value="Submit">
                <input type="button" value="Disable AutoComplete" onclick="disable_autocomplete();">
            </form>

        </div>
    </body>
</html>

To Disable Particular Text Field
<input type="text" autocomplete="off">

0 Comments


Html code work in comment box


Related Post