0
$(document).ready(function() {
$('#upload_photo').click(function() {
$('input[type=file]#upload_myphoto').click();
});
});
$(document).ready(function() {
$("input[type=file]#upload_myphoto").change(function() {
$("#node_profilepic").prop('src', 'loader.gif');
$("#upload_profilepic").submit();
});
});
$(function() {
$('#upload_profilepic').ajaxForm({
beforeSubmit: ShowRequest,
success: function (responseText, statusText) {
alert(responseText);
//$("#node_profilepic").prop('src',responseText);
$('.iframe').click();
},
error: AjaxError
});
});
function ShowRequest(formData, jqForm, options) {
//alert(formData);
var queryString = $.param(formData);
// alert(queryString);
return true;
}
function AjaxError() {}
이 코드는 Ajax 호출을 사용하여 이미지를 업로드하는 데 사용되며 IE를 제외한 모든 브라우저에서 작동합니다. , 내가 IEIE에서 Ajax 양식이 작동하지 않습니다.
어떤 버전을 알려주세요? jQuery의 어떤 버전입니까? – Nzall
본체가 말하는 내용은 무엇입니까? –
Ajax를 사용한 파일 전송 지원은 IE 10 이상에있는 [XMLHttpRequest Level 2] (http://caniuse.com/#feat=xhr2)와 함께 추가되었습니다. –