首页 > 解决方案 > 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();
}

标签: javascriptmouseover

解决方案


推荐阅读