If you want to open these HTML pages on a button click use onclick location href.
onclick Attribute
onclick="window.location.href='Students.html';"
Input tag
<input type="button" onclick="location.href='https://google.com';" value="Go to Google" />
onclick location href Example
HTML code:
<html>
<body>
<input type=button onClick="location.href='index.html'" value='click here'>
</body>
</html>
Output:
OR
Button html href
<!-- if you are on Window : -->
<button onclick="window.location.href='page2.html'">
Button
</button>
<!-- if you are on linux or macOS : -->
<button onclick="location.href='page2.html'">
Button
</button>
Do comment if you have any doubts and suggestions on this HTML/JS tutoiral.
Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version
Gracias por el dato
Muito obrigada!
Thanks for the article, it was interesting!