How does native js trigger picture saving on mobile phones?

as mentioned above, pressing the picture long on the mobile end can display a pop-up window to save the picture. Now there is a need to press a button to trigger the pop-up window on the mobile side to save the picture, and then save the picture. Can this effect be achieved?

Mar.25,2021

I hope this article can help you https://juejin.im/post/5a17c5.


create a tag. The image source src is the picture to be saved.
resize the picture to the key point and click on the saved area. Set the opacity of to 0.
long-press the picture to save to the mobile phone is a function of the mobile browser itself.

Menu