0

我的网站中有一段代码如下(html页面):

    <form action="form.php" method="post">
      <table>
        <tr>
          <td>
            <input type="text" class="email1" name="name" maxlength="20" class="bg_in" />
          </td>
        </tr>
      </table>
    <input type="submit" name="posted" value="" class="bg_in2" />
  </form>

我想改变它而action="form.php"不是action="form.cs". 那可能吗?如果是这样,捕捉动作的方法名称应该是什么,我如何捕捉输入?

4

1 回答 1

0

The form is always submitted to the page itself. If you specify an action attribute, it is ignored. If you omit the method attribute, it will be set to method="post" by default. Also, if you do not specify the name and id attributes, they are automatically assigned by ASP.NET

If you select view source in an .aspx page containing a form with no name, method, action, or id attribute specified, you will see that ASP.NET has added these attributes to the form. It looks something like this:

于 2013-10-01T10:27:03.207 回答