Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 73935

Failed to load resource: the server responded with a status of 404 (Not Found) while loading image in img element

$
0
0

I want to load image while selecting it from file picker dialog.

Code given below but it does not load the image in img tag

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><div><img id="upload-file-info" /><form action="#"><label class="btn btn-primary" for="my-file-selector"><input id="my-file-selector" type="file" style="display:none" onchange="$('#upload-file-info').attr('src', this.files[0].name)">Click to select image</label></form></div>

Viewing all articles
Browse latest Browse all 73935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>