Home > Web Front-end > CSS Tutorial > How to Remove the \'No File Chosen\' Tooltip from File Inputs in Google Chrome?

How to Remove the \'No File Chosen\' Tooltip from File Inputs in Google Chrome?

Susan Sarandon
Release: 2024-11-05 07:51:02
Original
1098 people have browsed it

How to Remove the

Hiding the "No File Chosen" Tooltip in File Inputs

In Google Chrome, selecting a file from an input field displays a tooltip indicating "No file chosen" if no file has been selected. While some browsers like Firefox don't show this tooltip, it can be problematic in certain scenarios.

Removing the Tooltip

The default tooltip text can be modified using the title attribute:

<code class="html"><input type='file' title="Your custom text" /></code>
Copy after login

However, attempting to remove the tooltip entirely by setting title to an empty string:

<code class="html"><input type='file' title="" /></code>
Copy after login

will not succeed.

**Solution: Use a Space as the

The above is the detailed content of How to Remove the \'No File Chosen\' Tooltip from File Inputs in Google Chrome?. For more information, please follow other related articles on the PHP Chinese website!

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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template