简体   繁体   English

如何将div的图像保存到移动设备的图库?

[英]How to save image of div to gallery of mobile device?

I'm working on a small web based app. 我正在开发一个基于Web的小型应用程序。 www.wrootle.com You can type text to a box. www.wrootle.com您可以键入文本框。 I use it to make quotes for instagram. 我用它来为instagram报价。 So i type text in the box, make a screenshot which gets saved to my gallery and then upload from there when i make a post. 因此,我在框中输入文字,制作一张截图,该截图将保存到我的画廊中,然后在我发帖时从那里上传。 Is there a javascript way to save an image of the textarea to the gallery of my mobile device? 有没有一种JavaScript方法可以将文本区域的图像保存到移动设备的图库中?

You can use download attribute to achive this. 您可以使用download属性来实现。 Example: 例:

 <a href="https://m.popkey.co/987552/NGLb3.gif" download><img src="https://m.popkey.co/987552/NGLb3.gif"></a> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM