PHP
1
Вклад в тег
<form id="Form">
<input type="file" />
<input type="submit" value="Send" id="buttonSubmit">
</form>
$(document).ready(function () {
$("#buttonSubmit").bind("click", function (event) {
$('#Form').submit();
return false;
});
$('#Form').submit(function(e) {
var formData = new FormData(this);
$.ajax({
type:'POST',
url: '/url',
data:formData,
cache:false,
contentType: false,
processData: false,
success:function(data, status){
},
error: function (jqXHR, exception) {
}
});
e.preventDefault();
});
});