JSFiddle - React, Tailwind, and code Playground

by bhupendra negi

HTML

<form>
    <input type="text" id="imagename" value="" />
    <input type="button" id="btn" value="GO" />
</form>

JavaScript

document.getElementById('btn').onclick = function () {
            var val = document.getElementById('imagename').value,
                src =
                    'https://widgetfactory.extranet.3ds.com/proxies/dsxpeoplephoto/picture/crop/login/k8q/width/128/height/128';

            img = document.createElement('img');

            img.src = src;
            document.body.appendChild(img);
        }