问题描述
这个问题可能听起来很奇怪,但我有点需要这种情况发生.另一种方法是让人们按 Ctrl+Shift+i,但我更愿意避免这种情况,只提供一个链接.
The question might sound weird but I kind of need this to happen. The alternative would be to ask people to press Ctrl+Shift+i but I would prefer to avoid that and just provide a link.
该链接会显示在 Chrome 扩展程序中,所以我只对 Google Chrome 感兴趣.
The link would show up in a Chrome Extension so I'm only interested for Google Chrome.
推荐答案
抱歉,不太可能发生(除非是安全漏洞).您的页内 JavaScript 被故意沙盒化和限制 - 它可以通过 AJAX 与页面以及网络进行交互,但它不能也不应该与您计算机中发生的其他事情(包括浏览器)进行交互.
Sorry, not likely to happen (except as a security hole). Your in-page JavaScript is deliberately sandboxed and limited - it can interact with the page, and with the network through AJAX, but it cannot and should not interact with other things that happen in your computer - including the browser.
这篇关于如何从 JavaScript 打开 Google Chrome 控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!