I believe you could do it like this : var fd = new FormData(); fd.append( 'file', input.files[0] ); $.ajax({ url: 'http://example.com/script.php', data: fd, ... ... <看更多>
Search
Search
I believe you could do it like this : var fd = new FormData(); fd.append( 'file', input.files[0] ); $.ajax({ url: 'http://example.com/script.php', data: fd, ... ... <看更多>
AJAX #JQUERY #FORM #WebDevelopmentHello guys in this video im going to show you how to create ... ... <看更多>
How to send a file or formdata with jQuery is brought up a lot at StackOverflow I think you should do things better by trying to understand ... ... <看更多>
Setting contentType to false simply tells jQuery not to set a content header. Finally, setting data to "fd" submits our FormData object in the ... ... <看更多>
Try using .serialize() instead of FormData function step1SaveData(){ var formData = jQuery('#tpform1').serialize(); console.log(formData); jQuery.ajax({ ... ... <看更多>