Online Book Reader

Home Category

HTML5 Canvas [43]

By Root 6375 0
button:

formElement = document.getElementById("createImageData");

formElement.addEventListener('click', createImageDataPressed, false);

Then, in the createImageDataPressed() event handler, we call the toDataURL() method of the Canvas object (theCanvas), and set the value of the imageDataDisplay