Best way to pass parameters to jQuery's .load()

前端 未结 2 1091
情书的邮戳
情书的邮戳 2020-12-13 08:30

Is there a difference in passing parameters to .load

$(\"#myDiv\").load(\"myScript.php?var=x&var2=y&var3=z\")

vs

2条回答
  •  悲哀的现实
    2020-12-13 09:08

    In the first case, the data are passed to the script via GET, in the second via POST.

    http://docs.jquery.com/Ajax/load#urldatacallback

    I don't think there are limits to the data size, but the completition of the remote call will of course take longer with great amount of data.

提交回复
热议问题