JSFiddle - React, Tailwind, and code Playground

HTML

<textarea id="cow" rows="5" name="message" cols="50" onfocus="clear()" >Focus here calls clear()</textarea>

<textarea id="cow2" rows="5" name="message" cols="50" onfocus="clearText()" >Focus here calls clearText() </textarea>

JavaScript

function clear() { 
    document.getElementById("cow").value=' '; 
}


function clearText() { 
    document.getElementById("cow2").value=' '; 
}