【发布时间】:2020-05-14 20:09:08
【问题描述】:
<body>
<p>A function is triggered when the user is pressing a key in the input field.</p>
<input type="text" onKeyPress="myFunction()">
<script>
function myFunction() {
alert("You pressed a key inside the input field");
}
</script>
</body>
在我需要在输入框中按 f12 的地方找到此代码,如果有任何代码可以自动执行此操作,请告诉我(当 chrome 自动打开时,开发人员工具应该打开)
【问题讨论】:
-
this 是您正在寻找的东西吗?
-
简单地说,不。为什么你仍然希望用户打开 devtools?
标签: javascript google-chrome console automated-tests google-chrome-devtools