javascript file to html code example
Example 1: how to open html file with javascript
// In my case, I used a button to activate this function:
function myFunction() {
window.location.href = 'index.html';
}
Example 2: calling javascript file in html
<script type="text/javascript" src="yourfile.js"></script>