I want to change my radio button's value with image created via text input script.
var tCtx = document.getElementById('textCanvas').getContext('2d'), imageElem = document.getElementById('imagedeneme'); document.getElementById('text').addEventListener('keyup', function (){ tCtx.canvas.width = tCtx.measureText(this.value).width; tCtx.fillText(this.value, 0, 10); imageElem.src = tCtx.canvas.toDataURL(); }, false);
<label> <input type="radio" id="formanumara"name="taban" value="............."> <img src="textuesmetal3se4pcbbc_2K_Albedo.jpg"> </label> <canvas id='textCanvas' height=20></canvas> <img id='imagedeneme' > <textarea id='text'></textarea>
1.4m articles
1.4m replys
5 comments
57.0k users