JSFiddle - React, Tailwind, and code Playground
HTML
<body onload="showDiv()">
<div id="list">testing</div>
</body>
<script>
function showDiv() {
alert(document.getElementById('list').innerHTML);
if( document.getElementById('list').value == "test123") {
alert("match");
document.getElementById('passdiv').hidden = true;
document.getElementById('list').hidden = false;
} else {
alert("Password is incorrect.");
}
}
</script>