Answers for "Link inside the button"

5

add link behind a button in html

<!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>
Posted by: Guest on May-13-2020
1

a link button

<input type="button" onclick="location.href='https://google.com';" value="Go to Google" />
Posted by: Guest on December-27-2020

Browse Popular Code Answers by Language