类似于以下帖子:
Set focus on iframe in Chrome
Setting focus to iframe contents
从根目录/父目录开始,我希望能够将焦点传递给iframe。
iframe中可能需要重点关注的一切都很好。
iframe.contentWindow.focus();
但是,由于iframe.contentWindow是跨域框架,因此无法访问。
似乎答案是:不可能。
如果iframe中正在运行脚本,则可以直接在其中调用焦点。