1

当且仅当 $.post() 函数没有返回 html(错误)时,我才尝试刷新页面。当我没有location.reload(true);时,代码工作得很好 当下。当我确实有它时,页面速度似乎有加载速度决定它是否要验证......

我对此进行了测试,发现代码在远程服务器上运行时有 80% 的时间有效,但使用 MAMP 在本地运行时只有50% 的时间有效。为什么,有没有办法解决这个问题?

代码和一切:http: //jsfiddle.net/sman591/Zhays/

4

1 回答 1

1

为什么你有

var messagehtml = $('.window #message').html(); 

而不是 var messagehtml =$('.window #message').html()

于 2011-08-01T06:47:50.797 回答