You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
842 B

4 years ago
  1. // Image upload for front id
  2. $('#MainContent_reg_front_id').on('change', function (e) {
  3. $('.loadImg').remove();
  4. // console.log(e.target, 'e')
  5. for (var i = 0; i < e.target.files.length; i++) {
  6. var tmppath = URL.createObjectURL(e.target.files[i]);
  7. $(this).after('<span class="loadImg"><img src="' + tmppath + '" alt=""></span>');
  8. $(".loadImg img").fadeIn("fast");
  9. }
  10. });
  11. // Image upload for back id
  12. $('#MainContent_reg_back_id').on('change', function (e) {
  13. $('.loadImg1').remove();
  14. // console.log(e.target, 'e')
  15. for (var i = 0; i < e.target.files.length; i++) {
  16. var tmppath = URL.createObjectURL(e.target.files[i]);
  17. $(this).after('<span class="loadImg1"><img src="' + tmppath + '" alt=""></span>');
  18. $(".loadImg1 img").fadeIn("fast");
  19. }
  20. });