我在index.php file.Code中有一个html文件选择器,如下所示
//index.php (This is just an example)
<form enctype="multipart/form-data" action="http://myserver/abc/upload.php" method="POST">
Select image to upload :
<input name="photo" type="file" size="30" width="250">
<input type="submit" value="Upload"/>
</form>在firefox浏览器中,我可以看到文件选择器有一个文本字段(显示文件路径)和一个名为“Browse”的按钮(作为正常的文件选择字段)。
,但在chrome浏览器中,我看不到文本field.And按钮名是“选择的文件”,而不是“浏览”。
我怎么才能解决这个问题?
我需要在所有浏览器中显示这一点,就像在firefox浏览器中显示一样。
发布于 2011-08-10 08:50:47
没有标准的方法来定制文件输入样式,但是您可以找到大量的css/js技巧。使用关键词:custom css file input
发布于 2018-04-20 09:42:20
通过添加此内联样式来更改文件类型
<input name="photo" type="file" size="30" width="250" style="line-height:0;">
https://stackoverflow.com/questions/7008004
复制相似问题