Answers for "how to have set link in button"

4

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
0

button with href

onClick={() => {window.location.href="https://www.golfballs.com/"}}
Posted by: Guest on August-05-2020

Code answers related to "how to have set link in button"

Browse Popular Code Answers by Language