JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>
<body>

<form>
<br>
<input id="myElement" value="Remove me clicking on the button below" size=100>
</form>
<br>

<button onclick="myFunction()">Remove input</button>

<script>
function myFunction() {
    var x = document.getElementById("myElement");
    x.remove();
}
</script>

</body>
</html>