【问题标题】:Submit button not working. No action is taken when i click on the create account button提交按钮不起作用。当我点击创建帐户按钮时没有采取任何行动
【发布时间】:2016-03-22 16:49:45
【问题描述】:

这是我正在使用的表格。我希望它将数据发送到 1.php 但是当我单击创建帐户按钮时。请告诉这段代码有什么问题。

<div class="logmod__form">
  <form accept-charset="utf-8" action="1.php" class="simform" method="post">
    <div class="sminputs">
      <div class="input full">
        <label class="string optional" for="user-name">Email*</label>
        <input class="string optional" maxlength="255" id="user-email" placeholder="Email" type="email" size="50" />
      </div>
    </div>
    <div class="sminputs">
      <div class="input string optional">
        <label class="string optional" for="user-pw">Password *</label>
        <input class="string optional" maxlength="255" id="user-pw" placeholder="Password" type="text" size="50" />
      </div>
      <div class="input string optional">
        <label class="string optional" for="user-pw-repeat">Repeat password *</label>
        <input class="string optional" maxlength="255" id="user-pw-repeat" placeholder="Repeat password" type="text" size="50" />
      </div>
    </div>
    <div class="simform__actions">
      <input class="sumbit" name="commit" type="sumbit" value="Create Account" />
      <span class="simform__actions-sidetext">By creating an account you agree to our <a class="special" href="#" target="_blank" role="link">Terms & Privacy</a></span> </div>
  </form>
</div>

【问题讨论】:

  • 错字type="sumbit"

标签: php html twitter-bootstrap


【解决方案1】:

在您的按钮中更正它

type="submit"

您在字段中错过了name 属性,如果没有它,则不会提交任何内容

<input class="string optional" maxlength="255" id="user-pw-repeat" placeholder="Repeat password" type="text" size="50"  name="user-pw-repeat"/>

【讨论】:

    猜你喜欢
    • 2018-10-29
    • 1970-01-01
    • 1970-01-01
    • 2021-09-18
    • 1970-01-01
    • 1970-01-01
    • 2022-06-16
    • 1970-01-01
    • 2022-01-20
    相关资源
    最近更新 更多