0

我的 html 内容如下所示:

            <table>
                    <tr>
                          <th>Log1 Column</th>
                          <th>Log2 Column</th>
                          <th>Log3 Column</th>
                    </tr>
            <tbody id="bottomLogTable"></tbody>
            </table>

不知何故,我没有从 #bottomLogTable 位置的 $.post 获取返回数据,但萤火虫说 200 ok,这意味着数据返回。

        $("#logClick").live("click", function()
        {
              $.post("node2542.txt", function(data)
              {
                    $("#bottomLogTable").append(data); // not display returned data
                    $("#bottomLogTable").html(data); // also not display returned data

              });
        });

有什么建议或想法可以让我朝着正确的方向解决这个问题吗?

4

1 回答 1

0

编辑:如果您有效地收到响应但仍然无法正常工作,则可能是跨域问题。您可以尝试将您的文本文件放在与您的页面完全相同的域中,看看它是否有效...

值得一提的是 Live 在 jQuery 的最新版本中已被弃用...

从 jQuery 1.7 开始,不推荐使用 .live() 方法。使用 .on() 附加事件处理程序

http://api.jquery.com/live/

于 2013-04-18T19:18:27.077 回答