JSFiddle - React, Tailwind, and code Playground
HTML
<p id="theInput">
desired-value
</p>
JavaScript
var value = document.getElementById("theInput").value;
console.log(value);
<p id="theInput">
desired-value
</p>
var value = document.getElementById("theInput").value;
console.log(value);