Created
June 6, 2022 10:17
-
-
Save tararoutray/2c5d2cae1fc09e357250ff9095ad761f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Preview an Image Before Uploading Using JavaScript</h1> | |
<div class="image-preview-container"> | |
<div class="preview"> | |
<img id="preview-selected-image" /> | |
</div> | |
<label for="file-upload">Upload Image</label> | |
<input type="file" id="file-upload" accept="image/*" onchange="previewImage(event);" /> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment