O
O
oyshomusic2020-07-23 07:20:46
css
oyshomusic, 2020-07-23 07:20:46

How to make a transition to another html file on the button?

Hello!
There are four buttons in the code (To assign the numbers, Information, etc.). It is necessary for me that when clicking on them, another html file opens (for example: infromation.html).
How to implement it?
And I understand correctly that you will need to add /route in the script?
I will be grateful for every answer!

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Web Application</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/png" href="images/icons/favicon.ico"/>
  <link rel="stylesheet" type="text/css" href="../static/css/main.css">
</head>
<body>
  <div class="container-contact100">
    <div class="wrap-contact100">
      <form class="contact100-form validate-form">
        <span class="contact100-form-title">
          Choosen action
        </span>
            
            <div class="container-contact100-form-btn">
              <div class="wrap-contact100-form-btn">
                <div class="contact100-form-bgbtn"></div>
                  <button class="contact100-form-btn">
                    <span>
                    To generate numbers
                    </span>
                </button>
              </div>
            </div>
        
            
            <div class="container-contact100-form-btn">
              <div class="wrap-contact100-form-btn">
                <div class="contact100-form-bgbtn"></div>
                  <button class="contact100-form-btn">
                    <span>
                    To assign the numbers
                    </span>
                </button>
              </div>
            </div>
        
            
            <div class="container-contact100-form-btn">
              <div class="wrap-contact100-form-btn">
                <div class="contact100-form-bgbtn"></div>
                  <button class="contact100-form-btn">
                    <span>
                    Activate the card
                    </span>
                </button>
              </div>
            </div>
        
                
            <div class="container-contact100-form-btn">
              <div class="wrap-contact100-form-btn">
                <div class="contact100-form-bgbtn"></div>
                  <button class="contact100-form-btn">
                    <span>
                    Information
                    </span>
                </button>
              </div>
            </div>

      </form>
    </div>
  </div>
</body>
</html>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Hanneman, 2020-07-23
@oyshomusic

There are several options. It would be more correct through the visual CSS design of the link in the form of a button (if the button is used outside the form tag), but in your clumsy case it is solved through JavaScript:

<button onclick="window.location.href='http://site.ru/information.html';">
   Information
</button>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question