$("#savebtn").on({
        touchstart: function (e) {
            // 长按事件触发
            timeOutEvent = setTimeout(function () {
                timeOutEvent = 0;
                save();
            }, 400);
            //长按400毫秒
            // e.preventDefault();
        },
        touchmove: function () {
            clearTimeout(timeOutEvent);
            timeOutEvent = 0;
        },
        touchend: function () {
            clearTimeout(timeOutEvent);
            if (timeOutEvent != 0) {
            }
            return false;
        }
    })
    function save()
    {
        

$.ajax({ url:
'****', type: 'POST', data: { typeCode: typeCode }, contentType: 'application/json', success: function (data) { var a = $("<a></a>").attr("href", "data:image/png;base64," + data.Data.Image).attr("download", "***.png").appendTo("body"); a[0].click(); a.remove(); } }); }

 

内容来源于网络如有侵权请私信删除
你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!

相关课程