模态弹出焦点问题 [英] Modal popup focus issue

查看:62
本文介绍了模态弹出焦点问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个模态弹出窗口,里面有一个按钮。在Mozilla 17.0.1中,在加载模态弹出窗口时,我无法专注于按钮。我专注于IE9中的按钮和Chrome22

I have a modal popup and in it there is a button. In Mozilla 17.0.1 i cant get focus on the button while modal popup is loaded. I get focus on button in IE9 and Chrome22

推荐答案

使用此focus()方法为按钮设置焦点。



document.getElementById(btnId)。focus();
Use this focus() method to set focus for your button.

document.getElementById("btnId").focus();


这篇关于模态弹出焦点问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆