Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function readURL(input) {
  2.  
  3. if (input.files && input.files[0]) {
  4. var reader = new FileReader();
  5.  
  6. reader.onload = function (e) {
  7. $('#blah').attr('src', e.target.result);
  8. }
  9.  
  10. reader.readAsDataURL(input.files[0]);
  11. }
  12. }
  13.  
  14. $("#imgInp").change(function(){
  15. readURL(this);
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement