문제

Since there's no way of moving to the next tab using javascript,

is there a code which presses CTRL + Tab so it'd move to the next tab?

도움이 되었습니까?

해결책

It's not possible.

It would be a security risk for JavaScript to have the ability to control the browser in that way.

Imagine a malicious site (or a stupid developer) attempting to set the focus to the tab that contains their site every second...

다른 팁

No. You cannot do this. There is no way to switch between tabs using Javascript, or any kind of client scripting. That's as it should be. I don't want websites controlling the way I use my browser.

If you want to have tabs that you can switch between programmatically, you'll have to implement them yourself within the browser window.

You can't send system level keys in javascript due to security reasons.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top