JSFiddle - React, Tailwind, and code Playground
HTML
<label for="name">Input mit JavaScript</label>
<input type="text" name="name" id="name" value="Max Mustermann" />
<br><br>
<label for="name2">Input mit Placeholder</label>
<input type="text" name="name2" placeholder="Max Mustermann" />
JavaScript
var input = document.getElementById('name');
var inputcache = "Max Mustermann";
input.addEventListener('focus', function(){
inputcache = this.value;
this.value = "";
});
input.addEventListener('blur', function(){
this.value = inputcache;
});