Jquery图像上传在firefox中不起作用
图片上传不是第一次在firefox中工作,但是在google chrome中工作很好。如何解决这个问题,我还需要限制图片格式。在这段代码中,我如何限制图片格式请帮助我的朋友Jquery图像上传在firefox中不起作用,jquery,performance,jquery-ui,Jquery,Performance,Jquery Ui,图片上传不是第一次在firefox中工作,但是在google chrome中工作很好。如何解决这个问题,我还需要限制图片格式。在这段代码中,我如何限制图片格式请帮助我的朋友 $('#imgInp').focusout(function () { function readURL(input) { if (input.files && input.files[0]) { va
$('#imgInp').focusout(function () {
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#blah').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
$("#imgInp").change(function () {
if ($('#imgInp').val() != "No file chosen") {
readURL(this);
}
else {
alert("Insert Photo");
}
});
});
你在firefox上调试过吗?如果是,您是否有任何异常?否,第一次图像未上载,第二次图像上载到Firefox中,因此在调试时,您不会得到任何错误。只是图像没有上传与第一。我理解的对吗?是的,你是对的。