代码之家  ›  专栏  ›  技术社区  ›  vishnu

input type=“file”扩展名在firefox中不显示

  •  0
  • vishnu  · 技术社区  · 6 年前

    <input type="file"> googlechrome在一些点后显示了文件扩展名,但在Firefox中只显示了前几个字母,其他字母在末尾被删掉了。我需要在Firefox中显示文件扩展名和Chrome相同。我怎样才能解决这个问题?

    如果文件名为: AdministrationTemporaryFile.txt

    镀铬

    In Chrome

    In Firefox

    input[type="file"] {
      width: 200px;
    }
    <div>
      <input type="file">
      <input type="button" value="Upload">
      <input type="button" value="Cancel">
    </div>

    https://jsfiddle.net/vishnuprasadps/ctjwr5f8

    0 回复  |  直到 6 年前