Use document.write().
<html>_x000D_
<head>_x000D_
<script type="text/javascript">_x000D_
var number = 123;_x000D_
</script>_x000D_
</head>_x000D_
_x000D_
<body>_x000D_
<h1>_x000D_
the value for number is:_x000D_
<script type="text/javascript">_x000D_
document.write(number)_x000D_
</script>_x000D_
</h1>_x000D_
</body>_x000D_
</html>
_x000D_