开发者

How i Can Focus IFRAME In FireFox?

i cannot focus IFRAME In FireFox , But i Can Focus it on IE as Follow:

frames["MyFrameID"].focus();

i have trying many solutions but all not working , Can Any One Help M开发者_如何学Goe??


Try

document.getElementById("MyFrameID").contentWindow.focus();

Edit: I don't think you an access a particular frame in Firefox using the id in the frames collection.


Have you tried:

document.getElementById('MyFrameID').focus();

However, the focus() method is not defined for IFRAME elmements: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-50708718


The focus() method is defined for IFRAME elements.

Have a look here http://www.w3schools.com/jsref/event_onload.asp

It is listed in html tags which support it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜