本文介绍了设置焦点到iframe身体/内容在Firefox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个隐藏的可见性的ifram。我点击按钮 - iframe将是可见的,我想专注于其身体/内容。
,因为现在我必须点击按钮,然后进入iframe,这样两次点击。我想单击它,但不知道如何专注于Firefox。
在浏览器中可以:
尝试将焦点设置为 iframe_window 你的实际内容:
iframe_window.focus();
iframe_window.contentDocument.body.focus();
i have an ifram, which has hidden visibility.i click on button - iframe will be visible and i want to focus on its body/content.because now i must click on button and then into iframe, so thats two clicks. i want to do it on one click, but dont know how to focus in firefox.
in explorer it is ok:
var iframe_window = window.frames["myFrame"]; iframe_window.document.body.focus();try lot of examples for firefox, but they dont work. anybody know how to do it in firefox ? thanks.
解决方案Try to set the focus to iframe_window first and to your actual content next:
iframe_window.focus(); iframe_window.contentDocument.body.focus();
这篇关于设置焦点到iframe身体/内容在Firefox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!