上传文件type=file真心丑,所以采用方法解决一下。

中心思想是隐藏input,然后利用css定位,使其仍然可以被点击(有点欺骗的性质)

text需要禁止点击(使用diabled='disabled')

源代码