0

我对以下代码有一个小问题:

<form action="submit.php" action="POST">
    Name: <input type="text" name="name"><br>
    <input type="submit" value="Add Card!">
</form>

基本上,当我点击提交时,它会转到 URL:

http://localhost/submit.php?name=Mike

例如,不仅仅是 submit.php,我的印象是使用 POST 作为方法会通过 HTTP 而不是 URL 传递它,我想知道为什么会这样。

4

2 回答 2

2

很抱歉这个愚蠢的问题,漫长的一天,我使用 action="post" 而不是 method="post"。

现在觉得有点傻...

于 2013-05-02T03:46:59.960 回答
0

This will happen if you redirect to http://localhost/submit.php?name=Mike after dealing with the post data.

于 2013-05-02T03:35:00.877 回答