1// In my case, I used a button to activate this function:
2function myFunction() {
3 window.location.href = 'index.html';
4}
1// In case I don't want any buttons or links to open a document
2// I just want to open a document
3window.open('file.extension');