Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

input file 选择文件,连续点击会连续多次弹出文件选择框。

我用input file 选择图片上传,但是input file 有时候点击后反应很慢,而且连续点击后会连续多次弹出文件选择框。我想过点击是禁用input file 选择完解开禁用,但是如果用户直接取消,那么就无法兼听到。不知道有没有办法。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

input标签需要明确写上accept具体内容
比如:<input type="file" accept="image/jpg,image/JPG,image/gif,image/png" />


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...