Run this example and figure it out:
<!DOCTYPE html>
<html>
<body>
<p id="para1"></p>
<input type="text" id="textbox1" value="">
<script>
var js_variable = "Got it?";
document.getElementById("para1").innerHTML = js_variable;
document.getElementById("textbox1").value = js_variable;
</script>
</body>
</html>