How to print the value of variable in javascript in html

<p id="printhere"></p>

<script>
var txt = 'This is the variable.';
document.getElementById('printhere').innerHTML = txt;
</script>

Related Sourcecode

More Sourcecode

×
Google login
SignUp with Email
X