JS提交或保存照片时判空

//验证照片是否为空
            var billFile1 = $('#file').val();
            var files=document.getElementById("files").value;
            if((billFile1==null || billFile1=='') && (files==null || files=='')){
                alert("请上传照片!");
                return;
            }


            <input type="hidden" id="files" value="${stu.imgPath}"/>
            <input type="file" id="file" name="file" value="123" onchange="addIMG(this)" UNSELECTABLE="on"/>
               

猜你喜欢

转载自blog.csdn.net/cxws110/article/details/92806426