I have a canvas element and a form with a text box and a button. I want to be able to put an image url into the text box, and after click on the button, to have the image added in the canvas.
I DO NOT want to upload the picture as a file. I just want to put in canvas the image from the URL added in text box.
Here's the html code with the form and canvas:
Code: Select all
<form action="#" method="post">
<input type="url" name="imglink" id="imglink" placeholder="Insert image URL here" /><br>
<input type="button" value="Add Image" id="btn1" />
<canvas width="600" height="500" id="cnv1"></canvas>