malak laghoz

malak laghoz

  • NA
  • 66
  • 6.3k

display image in table asp mvc

Jul 3 2018 5:48 AM
 
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)