html – How to call a JavaScript function, declared in , in the body when I want to call it – Stack Overflow

I have a working JavaScript function declared in the head of an HTML page. I know how to create a button and call the function when the user clicks the button. I want to call it myself some where on the page:myfunction();How do I do it?

Source: html – How to call a JavaScript function, declared in , in the body when I want to call it – Stack Overflow

html – How to call a JavaScript function, declared in , in the body when I want to call it – Stack Overflow was last modified: July 13th, 2017 by Jovan Stosic