js onclick open page code example
Example 1: onclick open link js
window.open(url);
Example 2: how to go to index page on clicking a button in html
<input type=button onClick="parent.location='index.html'" value='click here'>
window.open(url);
<input type=button onClick="parent.location='index.html'" value='click here'>