Home > Web Front-end > HTML Tutorial > Two ways to disable clearing the input text input cache in HTML

Two ways to disable clearing the input text input cache in HTML

不言
Release: 2018-06-05 11:12:18
Original
2545 people have browsed it

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" />
Copy after login

 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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template