且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查用户是否在控制台中输入了某些内容?Javascript

更新时间:2023-11-28 14:53:40

这里有一篇关于这个的文章,肯定会帮助你,但如果你能解释你想在哪里以及为什么要使用它.帮助你会更容易

https://blog.guya.net/chrome/dev_tools/>

How could one check if the user enters something in the console? I want a function to run whenever a user enters something in the console, say

function whenUserTypesInConsole() {
    alert('you entered something in the console');
}

and if that can be done, is there a way to check what the user entered

function whenUserTypesInConsole(entry) {
    alert('you entered ' + entry + ' in the console');
}

I would like to avoid using jQuery or any library if possible.

Thanks

well here is article on this, will help you for sure, but if you can explain where and why you want to use this. It will be more easier to help you

https://blog.guya.net/chrome/dev_tools/