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

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

Susan Sarandon
Susan SarandonOriginal
2024-11-04 05:40:291047browse

How to Remove the

Removing the "No File Chosen" Tooltip from File Inputs in Chrome

In Google Chrome, a file input element displays a tooltip that reads "No file chosen" unless a file is selected. While settings the title attribute to an empty string typically removes tooltips, itなぜか no effect on this specific one.

To remove the tooltip, utilize this workaround:

Solution:


  1. Assign a title attribute with a single space:

    <input type='file' title=" " />


This will effectively eliminate the tooltip without affecting the input element's functionality.

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

Statement:
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