简体   繁体   English

Chrome 开发人员工具没有捕获在网络选项卡中提交的表单,为什么?

[英]Chrome developer tool does Not capture a form submit in network tab, Why?

a simple html page,一个简单的html页面,

<body>
    <form method="POST" action="abc">
        <input ... />
    </form>
</body>

submit the form with javascript用javascript提交表单

document.getElementsByTagName('form')[0].submit()

The request was indeed submitted (the server return a file as download), but I could not find any activity in network tab.请求确实已提交(服务器返回文件作为下载),但我在网络选项卡中找不到任何活动。

在此处输入图片说明

any idea?任何的想法? thanks in advance.提前致谢。

Update: Firefox is working well on capturing this.更新: Firefox 在捕捉这个方面做得很好。 在此处输入图片说明

From https://stackoverflow.com/a/55197547/3774338来自https://stackoverflow.com/a/55197547/3774338

If it triggers an event to download a file, Chrome will create a new tab and this tab will be closed immediately so that you cannot capture this request in Dev Tools.如果它触发下载文件的事件,Chrome 将创建一个新选项卡,该选项卡将立即关闭,因此您无法在开发工具中捕获此请求。

Solution: check 'Offline' checkbox at the network tab, which will fail to send the request, so the tab will not be closed.解决方法:勾选网络选项卡中的“离线”复选框,将无法发送请求,因此选项卡不会关闭。

暂无
暂无

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

相关问题 为什么 chrome 开发者工具不显示 WhatsApp 网络应用程序请求? - Why chrome developer tool does not show WhatsApp web app requests? Chrome网络开发人员工具标签显示,Dojo AJAX请求大约需要44年才能完成 - Chrome Network Web Developer Tool tab says Dojo AJAX requests are taking around 44 years to complete 读取和存储chrome Developer工具网络数据 - Reading & storing chrome Developer tool network data 为什么当我在 Chrome 上打开开发者工具 - 控制台选项卡时打印 `inject.js loaded` 消息 - Why `inject.js loaded` messeage is printed when I turn on Developer Tool - Console Tab on Chrome Google Chrome 开发者工具网络选项卡中的状态完成意味着什么? - What does status finished mean in Google Chrome developer tools network tab? Chrome开发者工具网络标签下的HTTP列,请求Cookie是什么意思? - What does the HTTP column under Chrome Developer Tools Network tab, Request Cookies mean? 为什么chrome开发者工具中的缓存存储在离线模式下变空了 - Why does the cache storage in chrome developer tool becomes empty in offline mode 为什么在Chrome中按Enter键时无法提交我的表单? - Why does my form not submit when pressing enter in Chrome? 如何通过JSON提取Chrome开发者工具的网络标签内容 - How to extract network tab contents of Chrome Developer tools via json 如何通过javascript提取Chrome开发者工具的网络标签内容? - How to extract network tab contents of Chrome Developer tools via javascript?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM