i didnt include the other html tags to help focus on this.
Btw im tryna avoid the method of having the onclick="funct()" method which would be written in the button tag. Thank you.
<button id="mybutton">Click me</button>
var b = document.getElementById("mybutton");
b.onclick = funct()
alert("Thanks for clicking me!");