可以使用jQuery和Ajax與此代碼或類似於我上傳圖片:如何使用ajax上傳jquery文件?
jQuery.ajax({
type: "GET",
url: "/userinfo/update/",
dataType: "json",
data: {
'name': jQuery("#name").val(),
'uploadedImage': jQuery("#uploadedImage").val()
},
success: function(response) {
jQuery("#errorDiv").html('');
},
complete: function() {
jQuery("#enableFormButton").remove();
}
});
現在
'name': jQuery("#name").val() is only returning the name of image file
沒有。您可以使用Ajax進行上傳。沒有插件需要 – tkone 2012-02-22 13:16:24
你告訴我你可以使用XMLHTTP通過AJAX傳輸文件? – 2012-02-22 13:17:48
那麼這個答案也是錯誤的嗎? http://stackoverflow.com/questions/2751795/ajax-file-upload – 2012-02-22 13:18:31