如何将dataurl传递给浏览器url参数

时间:2013-10-11 11:49:08

标签: javascript jquery canvas

我想将dataUrl传递给Browser Url.But dataUrl是long.How我可以这样做吗?

var chart = $('#con').highcharts();
canvg(document.getElementById('canvas'), chart.getSVG())

var canvas = document.getElementById("canvas");
var img = canvas.toDataURL("image/png");

$("#mylink").attr("href","exmple.com?"+"img="+img);

<a id="mylink" href="">My link</a>

0 个答案:

没有答案