how to call a function from external js file in html code example Example: calling javascript file in html <script type="text/javascript" src="yourfile.js"></script>