Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
71 views
in Technique[技术] by (71.8m points)

javascript - How to upload image and display it in card format?

I want user to upload images and i want to display it in card format. I want the image to be stored in localstorage. Currently i have used this code for getting the image

<label for="blogImg">Upload blog Img</label>

<input onkeyup="disableBtn()" id='blogImg' type="file" multiple="false" accept="image/*" class="form-control" onchange="uploaded(this.value)"> And this code to store the image.

var blogImg = document.getElementById('blogImg');

and I store it in an array using blogImg: blogImg.value,

I tried displaying image using arrayname.blogImg but it doesnt display it. Is there any alternate code??

question from:https://stackoverflow.com/questions/65839524/how-to-upload-image-and-display-it-in-card-format

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...