<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>
當使用者點擊「註冊為店主」按鈕時,我想前往一個新的 HTML 頁面。我在該部分使用了標籤,但它不起作用,我將如何在該部分使用標籤,或者有其他方法來解決它嗎? 請給我建議解決問題的方法。
使用
target="_blank"
in 作為<a>
標記的屬性將在新選項卡中開啟連結。範例在這裡。 https://www.w3schools.com/tags/att_a_target.asp
#查看可用於
<form>
的不同類型的屬性元素。特別是:
target
將會很有用,因為它指定了 from 回應將傳回的位置。 (通常這是您所在的頁面:target="_self"
)form
資料提交到,action
# 將會很有幫助