내가 다른 게시물에서 몇 가지 코드를 사용 ...
$('input[type=file]').val()
.. 그리고 각 특정 파일 입력 필드의 ID를 추가했다. 아래 코드는 입력에서 경로를 가져 와서 파일 이름 만 가져오고 두 개의 다른 파일 업로드 필드에 대해 다른 필드에 해당 값을 표시합니다. 1 톤이 넘는 경우 다음 코드를 기반으로 루프를 만들 수 있습니다.
$('#File1').change(function(){ // when you leave the File1 form field
var filename1 = $('input[type=file][id=File1]').val().split('\\').pop(); // get just the filename
$('#DL_Filename1').val(filename1); // and place it in the DL_Filename1 box
}); // end change
$('#File2').change(function(){ // when you leave the File2 form field
var filename2 = $('input[type=file][id=File2]').val().split('\\').pop(); // get just the filename
$('#DL_Filename2').val(filename2); // and place it in the DL_Filename2 box
}); // end change
해결 방법을 찾으셨습니까? 대답은 전혀 도움이되지 않습니다. – Alqin
@ Alqin 네. http://stackoverflow.com/questions/14035530/how-to-get-value-of-html-5-multiple-file-upload-variable-using-jquery –
을 확인하십시오. 링크가 pure-j 솔루션에 링크되어 있습니다. , 아니 jquery – dsdsdsdsd