1
qichangxing 2011-04-20 00:26:41 +08:00
获取参数或者短小的内容时用 GET,如 ?id=5 或者 ?title=abc&url=http...
获取大断的内容用 POST,通常表单用 POST 方式提交数据。 |
2
icyflash 2011-04-20 00:34:34 +08:00
最简单的分类:提交用POST,获取用GET。
|
3
1212e 2011-04-20 00:37:33 +08:00
lz这态度... 给楼上的童鞋补充一点,post还有隐藏url参数的作用 比如登陆
这种问题高手们肯定懒得回答...多google吧 |
4
darcy 2011-04-20 00:41:55 +08:00
对于增删查三种情况
对数据有变更的请求(增删)用post 普通情况下的获取信息(查)用get ajax多次获取同一url信息不打时间戳时用post |
5
iwinux 2011-04-20 00:44:21 +08:00
按照Rails里的惯例:
1. GET 对应的是“获取数据”,比如搜索框用的是 GET 2. POST 对应的是“新增数据”,比如发贴,回复的 form 用的是 POST 3. PUT 对应的是“修改数据”,这个目前可能还用得不多,Rails里是用 POST 来模拟的。 4. DELETE - 顾名思义。这个在 Rails 里是用 javascript 实现的。 |
7
GordianZ MOD 不要说用Google就可以找到答案的废话。谢谢!
http://lmgtfy.com/?q=what%27s+the+difference+between+post+and+get |
8
oldgun OP |
9
dreampuf 2011-04-20 20:01:31 +08:00
认真你就输的游戏少玩为好.
|
10
1212e 2011-04-20 20:06:14 +08:00
@oldgun
别人无偿回答你的问题 , 你还嫌不够全面系统正确? 都不理你你才高兴是吧... 既然你都知道 干嘛不发出来分享? 让我们看看什么叫 全面!!系统!!正确!! 的答案? ps 你不是不爱google吗? 别发google能搜到的喔~~ |
12
leogray 2011-04-21 19:54:06 +08:00
楼主,二。
|
14
dcoder 2013-01-31 03:29:56 +08:00
<Head First HTML>书上的原话:
There’s a couple of big differences that really matter. If you want users to be able to bookmark pages that are the result of submitting a form, then you have to use GET, because there is no way to bookmark a page that has been returned as a result of a POST. When would you want to do that? Say you have a Web application that returns a list of search results; you might want users to be able to bookmark those results so they can see them again without having to fill out a form. On the other hand, if you have a Web application that processes orders, then you wouldn’t want users to be able to bookmark the page. (Otherwise, every time they returned to the bookmark, the order would be resubmitted.) A situation when you’d never want to use a GET is when the data in your form is private, like a credit card or a password. Because the URL is in plain view, the private information is easily found by others if they look through your browser history or if the GET somehow gets bookmarked. Finally, if you use a <textarea>, you should use POST, because you’re probably sending a lot of data. GET requests have a limit of 256 characters; POST has no limit on the size of the data package you send. |