[英]how to remove no file selected and place the file name which is uploaded successfully using jquery in input type file
I am uploading a file using servlet and once it is successfull shows a message "Upload success". 我正在使用servlet上传文件,一旦成功显示消息“上传成功”。
But once upload is done the filename next to input file shows "no file selected". 但是一旦完成上传,输入文件旁边的文件名就显示“没有文件被选中”。
I need to show the file name once upload is success in input type file. 我需要在输入类型文件中上传成功后显示文件名。
How to do it using jquery/javascript 如何使用jquery / javascript来做到这一点
var filename = $('input[type=file]').val().split('\\').pop();
选择后,或点击上传后作为第一个动作更好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.