代码"/>
html图片山写字,html5 canvas写字签名板代码
js代码
var tablet;
$(function (){
tablet = new Tablet("#container",{
defaultColor: "#2e76da",
otherHtml: $("#temp").html(),
onInit: function (){
var that = this,
container = this.container;
container.find("select").eq(0).on("change", function (){
that.setLineWidth($(this).val());
});
container.find("select").eq(1).on("change", function (){
that.rotate($(this).val());
});
container.find(".save-canvas-to-img").on("click", function (){
console.log(that.getBase64());
if(!that.isMobile){
alert("请按f12打开控制台查看base64图片数据!");
}
});
container.find(".get_blob").on("click", function (){
that.getBlob();
});
/*container.find(".download").on("click", function (){
document.getElementById("preview_img").src = that.getBase64();
});*/
}
});
console.log(tablet);
});
更多推荐
html图片山写字,html5 canvas写字签名板代码
发布评论