【发布时间】:2018-06-27 19:33:48
【问题描述】:
需要检查file input 是否有附加文件。
此代码不起作用:
<input type="file" name="logo">
if ($('input[type=file]').length > 0) {
if($(this).val() == '') {
alert('Vide');
}
else {
alert('Pas Vide');
}
}
有什么帮助吗?
【问题讨论】: