JSFiddle - React, Tailwind, and code Playground

by Adrien Joly

JavaScript

var champ = document.createElement('input');
var bouton = document.createElement('button');
bouton.appendChild(document.createTextNode('effacer'));
document.body.appendChild(champ);
document.body.appendChild(bouton);
bouton.onclick = function() {
  champ.value = '';
};