0
獲取上傳的文件名稱問題能否請您看看這個演示,讓我知道爲什麼我不能夠得到的文件名(圖像)有對jQuery的
$('input:file').on('change', function(){
console.log($(this).prop("files")['name']);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="file" name="file" id="test" />
正如您所看到的,我在控制檯中獲得undefined
。