|
![](/images/resource/spacer.gif) |
|
สอบถามวิธีรับค่ารูปภาพจาก dynamic row บน modal โดยใช้ ajax |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ได้แล้วครับ
Code (JavaScript)
$('#insert').submit(function(e){
e.preventDefault();
//var form_data = $(this).serialize();
var valid = false;
$("input[type='file']").each(function() {
if ($(this).val() != '') {
valid = true;
}
});
var formData = new FormData($("#insert")[0])
$.ajax({
url:"test.php",
method:"POST",
data:formData,
contentType: false,
cache: false,
processData: false,
success:function(data) {
console.log(data)
}
});
});
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2023-05-05 10:52:45 |
By :
benlovehi5 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 02
|