简体   繁体   中英

Android browser not support long press save image(base64 ),(javascript create image)

1. try canvas -> base64 -> img.src -> user long press save image

demo http://test.m.grouplus.cn/activity/share_invitation?id=cVHPwxcgftY=

my javascript code

html2canvas($('#share_html'), {
            onrendered: function(canvas) {
                var newImg =document.createElement("img");
                newImg.src =  canvas.toDataURL('image/png')
                console.log(canvas.toDataURL('image/png'));
                var newbody = document.body.appendChild(newImg);
                $("#share_html").remove();
            }
        });

iOS is successful save image ,but android save image fail of long press

,demo2-> http://test.manager.grouplus.cn/canvas.html ,因为我的demo1需要电话注册

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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