katiekeel
-3
Q:

add link behind a button in html

<!-- 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>
3
<button><a href='https://google.com' alt='Broken Link'>This is a button</a></button>
12
<!DOCTYPE html>
<html>
   <head>
      <title>Title of the document</title>
   </head>
   <body>
      <form>
         <input type="button" onclick="window.location.href = 'https://www.w3docs.com';" value="w3docs"/>
      </form>
   </body>
</html>
4

New to Communities?

Join the community