Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

91.[jQuery]jquery 中$.get()提交和$.post()提交有区别吗? #91

Open
webVueBlog opened this issue Mar 20, 2020 · 1 comment
Open
Labels
jquery jquery

Comments

@webVueBlog
Copy link
Member

[jQuery]

@webVueBlog webVueBlog added the jquery jquery label Mar 20, 2020
@webVueBlog
Copy link
Member Author

相同点:都是异步请求的方式来获取服务端的数据;
异同点:
1、请求方式不同:$.get() 方法使用 GET 方法来进行异步请求的。$.post() 方
法使用 POST 方法来进行异步请求的。
2、参数传递方式不同:get 请求会将参数跟在 URL 后进行传递,而 POST 请
求则是作为 HTTP 消息的实体内容发送给 Web 服务器的,这种传递是对用户不可
见的。
3、数据传输大小不同:get 方式传输的数据大小不能超过 2KB 而 POST 要大
的多
4、安全问题: GET 方式请求的数据会被浏览器缓存起来,因此有安全问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jquery jquery
Projects
None yet
Development

No branches or pull requests

1 participant