Answers for "button html open new link"

1

how to add button to open a website using html

<button onclick="window.open('http://www.example.com')">
</button>
Posted by: Guest on February-24-2021
1

how do i make a link of a button go on a different page

<button type="button" onclick="window.location.href='the link you want the button to take you to'">Click me</button>
Posted by: Guest on February-19-2022

Browse Popular Code Answers by Language