$("#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(); } }); }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-06-03
  • 2021-11-21
  • 2021-11-11
  • 2022-02-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
  • 2021-10-01
  • 2021-12-11
相关资源
相似解决方案