Similar to the posts below:
From the root/parent I want to be able to pass focus to the iframe.
Anything that may be in focus in the iframe is fine.
iframe.contentWindow.focus();
However, the iframe.contentWindow is not accessible because its a cross-origin frame.
Seems like the answer is: not possible.
If there is a script running in the iframe you can directly call focus from there.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.