从Chrome控制台运行命令 [英] Running commands from chrome console

查看:74
本文介绍了从Chrome控制台运行命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用chrome控制台通过这2条命令从一个站点获取数据.

I am using chrome console to get data from one site with these 2 commands.

window.location.replace(link);

document.forms[2].submit();

有没有办法在同一行中一起运行主题或进行循环?因为我想多次跑步

Is there any way to run theme together in the same line or make a loop ?? Because i want to run in many times

推荐答案

Chrome开发工具片段FTW

打开Dev工具,导航到 Sources 标签,打开左侧的边栏,然后打开 Snippets 标签.现在,右键单击并创建新的代码段,将代码放入其中,然后通过 Ctrl + Enter 运行它.这些片段会保留在那里,直到您删除它们为止,即使Chrome重新启动后也是如此.它们非常强大且易于使用.

Chrome Dev Tools Snippets FTW

Open Dev tools, navigate to the Sources tab, open the sidebar on the left, and open the Snippets tab. Now right click and create new snippet, put your code inside it, and run it via Ctrl+Enter. These snippets stay there untill you delete them, even after chrome restart. They are very powerfull and easy to use.

在官方文章为开发工作流#Snippets

这篇关于从Chrome控制台运行命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆