document get element by id w3schools code example
Example 1: change innerhtml
document.getElementById("p1").innerHTML = "New text!";
Example 2: html how to get js
<!--Use The <script> tag to impliment javascript. You can put script
tags in the head or body tags or both. Though most people should put
there script tags in the head tag-->
<script>
console.log("Javascript");
</script>