简体   繁体   English

如何从 Firefox 开发人员工具启动 Ajax 请求?

[英]How can I initiate Ajax request from firefox developer tools?

I want to test several Ajax requests after the backend code completed.我想在后端代码完成后测试几个 Ajax 请求。 Now my method is adding a dummy button, an onclick event and an ajax request inside that.现在我的方法是在其中添加一个虚拟按钮、一个 onclick 事件和一个 ajax 请求。

Is there any way I can initiate Ajax request for testing from without editing my jsp / frontend?有什么方法可以在不编辑我的 jsp/前端的情况下从启动 Ajax 请求进行测试?

You can use Scratchpad , Firefox's dedicated tool for executing JavaScript.您可以使用 Firefox 的专用工具Scratchpad来执行 JavaScript。

From docs:从文档:

Unlike the Web Console, which is designed for interpreting a single line of code at a time, Scratchpad lets you edit larger chunks of JavaScript code, then execute it in various ways depending on how you want to use the output.与专为一次解释一行代码而设计的 Web 控制台不同,Scratchpad 允许您编辑更大的 JavaScript 代码块,然后根据您希望如何使用输出以各种方式执行它。

Just open up Firefox and hit Shift+F4 and you are good to go.只需打开 Firefox 并按Shift+F4即可。 using Ctrl+R you can run your code ( whole code or selected parts )使用Ctrl+R您可以运行您的代码(整个代码或选定的部分

BTW you can have Scratchpad as a tab in dev tools , of course it's not enabled by default, but you can enable that via dev tool options.顺便说一句,您可以将 Scratchpad 作为开发工具中的选项卡,当然默认情况下它不会启用,但您可以通过开发工具选项启用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Firefox Developer Tools中更新窗口对象? - How can I update a window object in Firefox Developer Tools? Chrome或Firefox上的开发人员工具:如何查看库中的帮助(建议)? - Developer Tools at Chrome or Firefox: how can I see help (suggestions) from libraries? 取消来自 Chrome 开发者工具的 ajax 请求 - Cancel ajax request from chrome developer tools 如何使用firefox OS进行Ajax请求和响应? - How can I make a Ajax request & response with firefox OS? 如何使用Firefox开发人员工具检查JavaScript - How to inspect javascript using Firefox developer tools 如何检测使用JavaScript在IE 10上运行的开发人员工具? - How can I detect the Developer Tools is running on IE 10 with JavaScript? 如何在 Chrome 的开发者工具中按主机和端口进行过滤? - How can I filter by host and port in Chrome's developer tools? 如何在 Chrome 开发者工具中访问 JSON 响应? - How can I access JSON response in Chrome Developer Tools? safari开发人员工具如何从iframe中观看表达式? - safari developer tools How do I watch expressions from iframe? 如何在 Chrome 或 Firefox 开发者工具控制台中使用 RxJS Observable? - How do I use RxJS Observable in Chrome or Firefox developer tools console?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM