Can different button inputs open new pages?
P粉450079266
P粉450079266 2024-04-02 12:06:54
0
2
398

<form id="signup">
  <div class="row">
    <div class="col-xs-12 col-sm-6">
      <div class="form-group">

        <input type="text" class="form-control" id="first_name" placeholder="First Name" required data-validation-required-message="Please enter your name." autocomplete="off">
        <p class="help-block text-danger"></p>
      </div>
    </div>
    <div class="col-xs-12 col-sm-6">
      <div class="form-group">

        <input type="text" class="form-control" id="last_name" placeholder="Last Name" required data-validation-required-message="Please enter your name." autocomplete="off">
        <p class="help-block text-danger"></p>
      </div>
    </div>
  </div>
  <div class="form-group">

    <input type="email" class="form-control" id="email" placeholder="Your Email" required data-validation-required-message="Please enter your email address." autocomplete="off">
    <p class="help-block text-danger"></p>
  </div>
  <div class="form-group">

    <input type="tel" class="form-control" id="phone" placeholder="Your Phone" required data-validation-required-message="Please enter your phone number." autocomplete="off">
    <p class="help-block text-danger"></p>
  </div>
  <div class="form-group">

    <input type="addr" class="form-control" id="address" placeholder="Address" required data-validation-required-message="Please enter your phone number." autocomplete="off">
    <p class="help-block text-danger"></p>
  </div>
  <div class="form-group">

    <input type="password" class="form-control" id="password" placeholder="Password" required data-validation-required-message="Please enter your password" autocomplete="off">
    <p class="help-block text-danger"></p>
  </div>
  <div class="form-group">

    <input type="password" class="form-control" id="password" placeholder="Confirm Password" required data-validation-required-message="Please enter your password" autocomplete="off">
    <p class="help-block text-danger"></p>
  </div>
  <div class="mrgn-30-top">
    <button type="submit" class="btn btn-larger btn-block" onclick="rdt()">
                  Sign up as customer
                </button>
  </div>

  <div class="mrgn-30-top">
    <button type="submit" class="btn btn-larger btn-block">
                    Sign up as Shop Owner
                  </button>
  </div>

  <div class="redirect">
    <p>Already have an account? <a href="file:///Users/megatron/Documents/Project/The_Isle_of_Kitchens/Login/login.html">Login Here</a></p>
  </div>
</form>

When the user clicks the "Register as Store Owner" button, I want to go to a new HTML page. I'm using tags in that section but it's not working, how would I use tags in that section or is there any other way to fix it? Please suggest me the solution to the problem.

P粉450079266
P粉450079266

reply all(2)
P粉515066518

Using target="_blank"in as an attribute of the <a> tag will open the link in a new tab.

Example here. https://www.w3schools.com/tags/att_a_target.asp

P粉834840856

View the different types of attributes available for <form> elements.

in particular:

  • target will be useful because it specifies the location to which the from response will be returned. (Usually this is the page you are on: target="_self")
  • If you want to specify a different endpoint to submit
  • form data to, action will be helpful
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template