<script> tag if it is written in external .js file.
Now keep following script tag under
<head> tag of the html page. Ideally the script blocks should be placed in the
<head> tag however it’s not mandatory.
AlertMe() method can be called from the html page on any event of the HTML page like onclick, onchange etc.
<input type="button" id="btnTest" onclick="AlertMe()" value="Click me!" />