停止加载页面上的 Javascript 执行?
我无法访问源代码的网站中存在一些问题代码。加载页面后,出现问题(至少在我的 Win 和 FF 版本中),导致 ajax 调用重复进行,而不是一次。这很快就把我锁在了萤火虫和几乎所有其他东西之外,所以我所能做的就是关闭选项卡。
我想要的是一个简单的按钮,我可以快速点击它来停止执行脚本......但是对于我所有的谷歌搜索和探索,我似乎找不到一个?我无法在 firebug 中设置断点,因为我很快就被锁定了,因为它与所有 ajax 调用作斗争
......我肯定在这里错过了一些简单的东西吗?
莱尔
There is some problem code in a website I don't have source access to. Upon loading the page, something goes wrong (in my version of Win and FF at least) such that ajax calls are made repeatedly instead of just once. This quickly locks me out of firebug and pretty much everything else so that all I can do is close the tab.
What I want is a simple button that I can quickly hit to stop executing scripts... yet for all my googling and poking about I can't seem to find one?? I can't set a break point in firebug as I get locked out really quick as it struggles with all the ajax calls...
Surely I'm missing something simple here?
Lyle
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以使用 Fiddler 通过自动应答器劫持 JavaScript 代码,并注释掉以下代码部分:拨打所有电话,以便您找出问题所在。
You can use Fiddler to hijack the JavaScript code with an autoresponder and comment out the part of code that is making all the calls so you can figure out what is going wrong.
Firebug 有一个“下一个中断”按钮。它在下次执行脚本时添加断点。
Firebug has a "Break on Next" button. It adds a breakpoint on the next execution of a script.
您可以禁用 Javascript
工具 ->选项->内容->禁用Javascript(我现在使用的是法语版本,不过这个名字应该不错)
或者使用 NoScript
You can disable Javascript
Tool -> Option -> Content -> Disable Javascript (I'm on a French version at the moment, the name should be good though)
Or use NoScript
JavaScript 是单线程的。这意味着您无法中断执行脚本。
Javascript is single threaded. This means you can't interrupt executing scripts.
请参阅 NoScript。
NoScript 是一个 Firefox 扩展,可让您阻止问题站点运行 JavaScript,同时仍允许其他站点正常工作 - 无需您点击按钮来停止它。
See NoScript.
NoScript is a Firefox extension that lets you block the problem site from running JavaScript while still allowing other sites to work as normal - no need for you to hit a button to stop it.