开发者

How do I grab a single image and put it in localStorage?

开发者 https://www.devze.com 2023-03-06 12:37 出处:网络
How is it done, of course without external libraries, in regular HTML开发者_C百科 with JavaScript? This seems like it should be a simple one-liner.

How is it done, of course without external libraries, in regular HTML开发者_C百科 with JavaScript? This seems like it should be a simple one-liner.

I'd like to just do:

<script>
localStorage.image=src("http://"+randomflikrimage+".jpg")
</script>


Try storing base64 data, use canvas. Check this: Get image data in JavaScript?

0

精彩评论

暂无评论...
验证码 换一张
取 消