本文介绍了HTML表单方法问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<form name="frn" action="download.php?f=sample">
<input type="submit" name="am" value="submit"/>
</form>
为什么将以上表格提交给以下人员?
Why the above form is submitted to following?
download.php
如果提到method =''GET'',为什么表格要提交给下面的人?
If method=''GET'' is mentioned, why the form submits to following?
download.php?am=submit
如果使用method ="POST",则只有它提交到原始操作字符串
if method=''POST'' is used, then only it submits to the original action string
download.php?f=sample
为什么?
Why?
推荐答案
<input type="hidden" name="f" value"sample" />
字段f不会被显示,但是在提交表单时它将在请求中发送.
并且使用GET或POST方法都将产生预期的结果.
祝您编程愉快!
-MRB
Field f will not be diplayed, but it will be sent in the request when the form is submitted.
And using method GET or POST will both yield the expected results.
Cheers and happy coding!
-MRB
这篇关于HTML表单方法问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!