HTML表单通过GET发送数据而不是POST [英] HTML form send data by GET instead POST
问题描述
< form name =这是非常奇怪的,但我的HTML表单通过GET发送数据,而不是POST。错误action =http://web-server.com:8888/WebApp/Email/Createmethod = post>
< input type =textname =urlsize =50readonly =readonly>
< br />
< span class =text>
错误:
< / span>
< br />
< br />
< span class =text>
评论:
< / span>
< br />
< input type =hiddenname =emailvalue =admin@admin.com>
< input type =hiddenname =subjectvalue =Errors>
< div style =margin-top:7px>< input type =submitvalue =Submit>
< input onclick =hide()type =buttonvalue =Closeid =closename =close>
< / div>
< / form>
我使用标准选项在IE10上测试它。
HTML表单非常简单,我只写了一些代码示例。
如何解决它?
谢谢!
更改网址。此网址你也是这样做的。
It is very strangely, but my HTML form send data via GET, not POST.
<form name="mistake" action="http://web-server.com:8888/WebApp/Email/Create" method=post>
<input type="text" name="url" size="50" readonly="readonly">
<br />
<span class="text">
Error :
</span>
<br />
<textarea rows="5" name="mis" cols="37" readonly="readonly"></textarea>
<br />
<span class="text">
Comment :
</span>
<br />
<textarea rows="5" name="comment" cols="37"></textarea>
<input type="hidden" name="email" value="admin@admin.com">
<input type="hidden" name="subject" value="Errors">
<div style="margin-top: 7px"><input type="submit" value="Submit">
<input onclick="hide()" type="button" value="Close" id="close" name="close">
</div>
</form>
I test it on IE10 with standart options.
HTML form very simple and i write only little example of code.
How to fix it?
Thank you!
P.S. Change URL. This URL web-server.com:8888/WebApp/Email/Create - belongs to asp mvc app.
When i run my web app and ths static site on local machine- it works. But when i runs static page on local machine- and mvc on server- it not works.
P.P.S.- this variant of form- is origine (i cut some tags). Now it is origine.
I dont why, but it works. May be - problem on server side?
It should be a post (assuming that you forgot the closing tag only in your example). I added your code and put the closing tag in an html file and submitted in Chrome. This is what I see in the network trace:
Also look at this question in case you are doing the same.
这篇关于HTML表单通过GET发送数据而不是POST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!