1

我正在为联系表单使用一个简单的 Formmail.pl 脚本。当我运行它时,它在 Safari、Mozilla、Opera 和 Chrome 上运行良好,但是当我在 IE 上测试它时,我收到以下错误:

Error 405 Method Not Allowed.
The requested method POST is not allowed for URL/contact_us.html

我也尝试过使用具有相同结果的 php 脚本。我已联系我的 ISP 以检查他们的服务器上是否允许使用 POST 方法,他们说可以。任何人都可以帮忙吗?

下面是表单代码:

<form id="contact_form" name="contact_form" method="post" formaction="cgi-bin/nms_formmail.pl" align="center" >
  <div align="center">
      <legend >Please fill in the form below </legend>

    </div> 
  <p><br />
  </p>
  <table width="620" border="0" cellspacing="10"  align="center" summary="A form to contact Clare">
  <tr>
    <td>
        <input type="hidden" name="recipient" value="test@test.ie"> <input type="hidden" name="subject" value="A message from your online form"> <input type="hidden" name="redirect" value="http://www.test.ie/contact_Thank_You.html">
        </td>
    </tr>
    <tr>
        <td align="right"><label for="realname">
          <div align="right"><font color="#0776A0">Name</font></div>
        </label></td>
        <td>
          <div align="left">
            <input type="text" name="realname" id="realname" size="40" accesskey="1" tabindex="n" required />
          </div></td>
      </tr>
      <tr>
        <td align="right"><label for="email">
          <div align="right"><font color="#0776A0">Email</font></div>
        </label></td>
        <td><div align="left">
          <input name="email" type="text" size="40" accesskey="2" tabindex="e" required />
        </div></td>
      </tr>
      <tr>
        <td align="right"><label for="phone">
          <div align="right"><font color="#0776A0">Phone</font></div>
        </label></td>
        <td><div align="left">
          <input name="phone" type="tel" size="40" maxlength="40" accesskey="3" tabindex="p" />
        </div></td>
      </tr>
      <tr>
        <td align="right"><label for="area">
          <div align="right"><font color="#0776A0">What area would like information regarding?</font></div>
        </label></td>
        <td><div align="left">
          <select name="area" id="area" accesskey="4" tabindex="a">
            <option value="courses" selected="selected">Courses</option>
            <option value="individual">Individual Sessions</option>
            <option value="talks">Talks</option>
            <option value="other">Other</option>
          </select>
        </div></td>
      </tr>
       <tr>
        <td align="right"><label for="comments">
          <div align="right"><font color="#0776A0">Message</font></div>
        </label></td>
        <td><div align="left">
          <textarea name="comments" id="comments" cols="45" rows="5" accesskey="c" tabindex="5"></textarea>

        </div></td>
      </tr>
      </table>
      <div align="center"><input type="image" src="_images/submit.gif" name="sub" id="submit" value="Submit" accesskey="s" tabindex="6" class="buttons" formaction="cgi-bin/nms_formmail.pl" target="_self" /></div>


</form>
4

1 回答 1

5
<form id="contact_form" name="contact_form" method="post" formaction="cgi-bin/nms_formmail.pl" align="center" >

应该

<form id="contact_form" name="contact_form" method="post" action="cgi-bin/nms_formmail.pl" align="center" >

没有formaction属性form。参考HTML 表单 - 基础知识

于 2013-07-15T08:53:59.337 回答