Saved X
Google login
SignUp with Email
X

How to print the value of variable in javascript in html

theindreshverma ( Edited  Sep 01, 12:54 am )
Login

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

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

Sourcecode Tags

More Sourcecodes

More Sourcecodes