5
Answers

display image in table asp mvc

malak laghoz

malak laghoz

6y
652
1
 
I made this script, my mistake here is that I need to make images and its action in a table but here the image with its header also repeated
$(document).on('change', '#WithEvents', function () {
var fileReader = new FileReader();
fileReader.onload = function (e) {
$('.divImages').prepend('<table><tr><th>image</th><th>action</th></tr><tr><td><img class="imgfieldset" id="show" src=' + e.target.result + ' width="150" /></td><td><button>x</button></td></tr></table >');
}
fileReader.readAsDataURL($(this)[0].files[0]);
}); 
Answers (5)