javascript - how to get html2canvas working in ie8? -
i trying run simple html2canvas code. work great in chrome, ie9, firefox. not working in ie8
code:
html2canvas($(#section), { onrendered: function (canvas) { var img = canvas.todataurl().replace(/^data[:]image\/(png|jpg|jpeg)[;]base64,/i, ""); $.ajax({ type: "post", contenttype: "application/json; charset=utf-8", url: "/home/savediv", data: "{'imagedata': '" + img + "'}", datatype: "json", async: false, cache: false, success: function (msg) { }, error: function (result) { alert('error'); } }); } }); is there way can working in ie8. have heard flashcanvas not sure on how utilize it.
else, there other way can capture <div> element in ie8.
i recommend using polyfill: heres canvas one
javascript jquery html2canvas flashcanvas
No comments:
Post a Comment