网页填表 取图片
本帖最后由 10969 于 2023-12-17 21:44 编辑网页填表网页_取图片
var img = document.querySelector('#randImg > img');
var canvas = document.createElement("canvas");
canvas.width = img.width;
canvas.height = img.height;
var ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0, img.width, img.height);
var dataURL = canvas.toDataURL("image/jpeg");
return dataURL;
验|证|码
页:
[1]