【问题标题】:Spurious jQuery ajax GET parameter虚假的 jQuery ajax GET 参数
【发布时间】:2010-12-07 16:58:25
【问题描述】:

我在一个while循环中有这个PHP:

echo "<td><a href='#' class='po'>" . $row['order_no'] . "</a></td>";

还有这个 jQuery:

$(".po").click(function(){
                var po = $(this).text();
                var dataString = 'po='+ po;

                $.ajax({
                  context: this,
                  type: "GET",
                  url: "projectitems.php",
                  data: dataString,
                  cache: false,
                  success: function(html) {
                    $(this).closest(".resultsItems").html(html);
                  }
                });

            });

但是GET的参数是这样的:

  _ 1291741031991
  po    102

po 是正确的,但最重要的是什么?顺便说一下,这是来自 Firebug 的

【问题讨论】:

标签: php jquery http-get


【解决方案1】:

您已将缓存设置为 false,所以我猜这个数字是 jQuery 附加到查询字符串的“缓存破坏器”。

【讨论】:

  • +1 - 是的,当前时间戳 - new Date().getTime() 输出。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2010-12-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多