JSFiddle - React, Tailwind, and code Playground

by siyakunde

HTML

<html>
    <head>
        <script>
        function clickedIt(buttonValue, text){
            document.getElementById('txt').value = buttonValue;
            Copied = text.createTextRange();
            Copied.execCommand("Copy");
        }
        </script>
    </head>
    <body>
        <input type='text' id='txt' value=''/>
        <input type='button' value='Button1' onclick='clickedIt("Button1", this)'/>
        <input type='button' value='Button2' onclick='clickedIt("Button2", this)'/>
        <input type='button' value='Button3' onclick='clickedIt("Button3", this)'/>        
    </body>
</html>