我正在使用 jQuery 执行 ajax 回调并处理大量对象(超过 150 个)。在我的代码中某处有导致 FF 浏览器显示此消息的函数:
A script on this page may be busy, or it may have stopped responding.
You can stop the script now, or you can continue to see if the script will complete.
Script: mylocalserver/website/Scripts/jquery1.6.2.min.js:16
我需要一种方法来了解是哪个脚本导致了这种情况的发生。如果我可以使用 firebug 来做,我该如何使用它?
最佳答案
你可能有一个无限循环。 150 个对象并不算多(如果它们不是那么大的话)。
关于javascript - 如何知道哪个 JavaScript 函数执行时间最长?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8655484/