【发布时间】:2008-10-20 13:22:42
【问题描述】:
在 Ajax GET 请求中将数据作为参数传递与 URL 的一部分相比有什么优势?
使用参数:
var ajax = new Ajax.Request('server.php',{
parameters: 'store=11200&product=Meat',
onSuccess: function(myData){whatever}
});
使用网址:
var ajax = new Ajax.Request('server.php?store=11200&product=Meat',{
onSuccess: function(myData){whatever}
});
【问题讨论】:
-
您是否使用 Prototype 作为 ajax 库?从方法之类的看是这样的。
标签: javascript ajax prototypejs