jQuery: how to get file name from fileupload control?

What I want to implement is by clicking “attach a file”, a file browser will be open to let user choose a file. I use jQuery to set onclick function of “attach a file”, and set the opacity of a fileuload control to be 0. So it is like display:none. But I don’t know how to get the file that user selected from fileupload control. Even don’t know what event should be capture in the process. I want to save the file in a hidden div, so I can use it in backend code. Any method?

newest questions tagged jquery – Stack Overflow

About Admin