javascript - How to click window on mouseover in javascript?
问题描述
I would like to have the mouse auto-select the window as it mouses over. This way the hotkeys deliver to the correct window. view-container.external-view-
container
is a container inside the window that I was trying to click on mouseover
. Any thoughts how I can do this in plain javascript?
document.querySelector('.view-container.external-view-
container').addEventListener("mouseover", mouseOver);
function mouseOver() {
document.querySelector('.view-container.external-view-container').click();
}
解决方案
推荐阅读
- python - django-plotly-dash 中的 Dash 应用程序中断迁移,如何阻止它在迁移中执行?
- reactjs - React:在普通函数中使用钩子是不是很糟糕?
- android-studio - 骰子滚轮应用,使用 Kotlin 格式化属性 id 调用
- python-3.x - 在 python 中,如何提高非常大的文件目录的 glob 性能?
- c - 如何在c中从字符串中删除字符
- function - Pine 脚本 - 动态变量?(不一定是正确的术语)
- javascript - 添加实例化网格反应纤维threejs
- android - LineChart Android - xAxis 以毫秒为单位
- php - 按自定义字段过滤帖子 - url 正确更新但过滤不起作用
- matlab - 是否可以在没有深度学习工具箱的情况下将 KERAS 模型导入 Matlab?