最好的方法参数传递给jQuery的.load() [英] Best way to pass parameters to jQuery's .load()
本文介绍了最好的方法参数传递给jQuery的.load()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有参数传递给 .load
$("#myDiv").load("myScript.php?var=x&var2=y&var3=z")
VS
$("#myDiv").load("myScript.php", {var:x, var2:y, var3:z})
此外,有没有大小限制多少 .load
能处理?能够
myScript.php
返回几百行的数据没有问题?
Also, is there a size limit to how much .load
can handle? Can
myScript.php
return a couple hundred rows of data without issue?
推荐答案
在第一种情况下,该数据是通过GET传递给脚本,在通过POST第二。
In the first case, the data are passed to the script via GET, in the second via POST.
<一个href="http://docs.jquery.com/Ajax/load#urldatacallback">http://docs.jquery.com/Ajax/load#urldatacallback
我不认为有限制的数据大小,当然远程调用的completition将需要更长的时间与数据量很高。
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.
这篇关于最好的方法参数传递给jQuery的.load()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文