JSFiddle - React, Tailwind, and code Playground
HTML
<input id="txtYourName" type="text" value="Anonymous" name="txtYourName"></input>
JavaScript
$('#txtYourName').attr('placeholder','Your name');
$('#txtYourName').val('');
<input id="txtYourName" type="text" value="Anonymous" name="txtYourName"></input>
$('#txtYourName').attr('placeholder','Your name');
$('#txtYourName').val('');