按下Enter表单未按预期提交

时间:2019-03-14 12:19:46

标签: html forms

我得到了一个现成的页面,该页面具有与我们联系的表单。我通过添加表单验证和php发送电子邮件使其功能正常。 http://mdscomputers.ae/new/aruba/form.html具有原始格式,并且效果很好

我喜欢这种表格,所以我在另一个网站上使用了它。原始表单有一些我不需要的多余内容,因此当我将表单转移到其他网站时,我将其删除。另一个网站中表格的编码为:-

我有2个问题:-

1)在我按原始表单时在表单提交的字段中输入。在其他网站的修改表单中,在字段中按Enter键无济于事,我需要在提交按钮上按提交表单。我猜在另一个网站上有一些编码,当按回车键时,它禁止提交。我希望能够通过按Enter提交

2)在原始表单中,操作正常,并且正在打开我提交表单时指定的页面。在其他网站中以修改后的形式显示的内容,当我按Submit时,我收到一个页面未找到的错误,并且未打开我在操作中指定的页面。现在我想在提交表单时打开联系人页面

另一个网站是http://mdscomputers.ae/new/buyback/buyback.html,修改后的表格位于页面底部

<div class="mktoForm" id="elqForm">
  <form id="elqForm" method="post" name="elqForm" action="contactus.php">
    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718959"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Contact_First_Name"><strong>First Name</strong> *:</label>
      <input type="text" required="required" id="Contact_First_Name" name="Contact_First_Name" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718960"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Contact_Last_Name"><strong>Last Name</strong> *:</label>
      <input type="text" required="required" id="Contact_Last_Name" name="Contact_Last_Name" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718961"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Contact_Email"><strong>Business Email</strong> *:</label>
      <input type="text" required="required" pattern="[+a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$" id="Contact_Email" name="Contact_Email" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718962"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Job_Responsibility"><strong>Job Title</strong> *:</label>
      <input type="text" required="required" id="Job_Responsibility" name="Job_Responsibility" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718963"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Company_Name"><strong>Company Name</strong> *:</label>
      <input type="text" required="required" id="Company_Name" name="Company_Name" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718964"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Company_Country"><strong>Country</strong> *:</label>
      <input type="text" required="required" id="Company_Country" name="Company_Country" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718965"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Company_State_Province"><strong>City</strong> *:</label>
      <input type="text" required="required" id="Company_State_Province" name="Company_State_Province" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718966"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Contact_Phone_Number"><strong>Business Phone Number</strong> *:</label>
      <input type="text" required="required" id="Contact_Phone_Number" name="Contact_Phone_Number" autocomplete="off">
    </div>

    <div class="elqFormRow">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718966"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <label for="Numbe_Of_Employees"><strong>Number of Employees</strong> *:</label>
      <select id="Numbe_Of_Employees" name="Numbe_Of_Employees">
        <option value="bet10and49">Between 10 and 49</option>
        <option value="bet50and99">Between 50 and 99</option>
        <option value="bet100and199">Between 100 and 199</option>
        <option value="ab200">Above 200</option>
      </select>
    </div>

    <div class="elqFormRow text-center">
      <div style="line-height:0px;font-size:0px;padding:0;margin:0;max-height:0px;">
        <a name="eiel1718967"><img src="x.gif" width="1" height="0" style="display:block; height:0px !important;" class="anchorlink_image" alt=""></a>
      </div>
      <div class="elqFormRow text-center">
        <input type="submit" id="elqFormSubmitBut" class="orange_btn" value="Submit" checkrequired="true">
      </div>
    </div>
  </form>
</div>

0 个答案:

没有答案