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
。