jquery $.post() vs $.get()

前端 未结 5 1080
[愿得一人]
[愿得一人] 2021-02-04 14:47

I need to retrieve a simple page and use the data that it returns. Is there any difference between $.post() and $.get() should I be using one over the

5条回答
  •  执笔经年
    2021-02-04 15:30

    If you're not submitting data, then you actually should be using $.load();

    $.get(); and $.post() are typically for submitting data to a server, so you don't need them in this context. There are big differences between POST and GET data, you should take some time to read up on them.

提交回复
热议问题