Sometimes the browser has a lot of cache, and we cannot perform a certain operation. We must clear the cache before we can run it. In fact, most browsers will cache the input value by default. Only by using ctl F5 to force refresh can the cache records be cleared. . If you do not want the browser to cache the input value, there are two methods, please refer to the following
Most browsers will cache the input value by default. Only those who use ctl F5 to force refresh can clear the cache record.
If you do not want the browser to cache the input value, there are two methods:
Method 1:
Add to the input that you do not want to use caching
XML/HTML CodeCopy content to clipboard
autocomplete="off";eg: <input type="text" autocomplete="off" name="test" />
Method 2:
Add
XML/HTML Code to the form tag where the input is located
autocomplete="off";eg: <form action="#" autocomplete="off"> <input type="text" autocomplete="off" name="test" /> </form>
Related recommendations:
How to make text boxes such as form input read-only and non-editable in HTML
The above is the detailed content of Two ways to disable clearing the input text input cache in HTML. For more information, please follow other related articles on the PHP Chinese website!