简体   繁体   中英

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".

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

var filename = $('input[type=file]').val().split('\\').pop();

选择后,或点击上传后作为第一个动作更好。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM