Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script> function readURL(input) {
- if (input.files && input.files[0]) {
- var reader = new FileReader();
- reader.onload = function (e) {
- $('#blah').attr('src', e.target.result).width(100).height(100);
- };
- reader.readAsDataURL(input.files[0]);
- }
- }
- </script>
- <img id="blah" src="<?php echo getImage('boy.png'); ?>" width="100px" height="100px">
- onchange="readURL(this);" //it should to be use with input field //type="file"
Add Comment
Please, Sign In to add comment