我发现 <input type=“search”> 仅适用于 Chrome 和 IE,但不适用于 Firefox。
如何让 <input type=“search”> 在 Firefox 中显示取消按钮 (x)?

最佳答案

Webkit 衍生浏览器放入 x 以清除值。火狐没有。然而,firefox 支持此功能,但它没有做任何事情,您需要自己设置样式以在 Firefox 中显示 X 按钮。

以下链接将帮助您实现目标: HTML Textbox with a clear button in Pure CSS and without JavaScript

10-05 20:57
查看更多