IE 8中的Tab键事件 [英] Tab key event in IE 8

查看:98
本文介绍了IE 8中的Tab键事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在开发一个java Web应用程序。该应用程序正在IE 6和IE 8中使用.IE 8中的tab键事件存在问题,我无法准确找到解决方案。


我有输入字段说"用户ID",其选项卡索引属性设置为2.在IE 6中,当我按Tab键时焦点移动到地址栏(URL)并按下一个tab键按下焦点移动到预期的文本字段("用户ID")。


但在IE 8中,使用相同的代码,当我按Tab键时,焦点移动到地址栏并显示下一个选项卡按键将焦点移至兼容模式图标(如果打开兼容模式)或刷新图标(如果兼容模式已关闭),依此类推。只有在按
第9个标签键时,焦点才会移动到输入字段("用户ID")。


在URL之后,焦点应移动到输入字段中IE 8,这是可能的.. ??如果是这样,请提供解决方案..


提前致谢。


Gayathiri kalluru

解决方案

你无法控制它,因为它超出了你网页的范围。


但是你可以让你的控制在身体拥有之后获得焦点加载。请参阅此示例:
http://www.plus2net.com/html_tutorial/set-focus.php


Hi,

I am working on a java web application. The application is being used both in IE 6 as well as IE 8. There is an issue with the tab key event in IE 8 and i am unable to find a solution exactly.

I have a input field say "User ID", for which the tab index property is set to 2. In IE 6, when i press tab the focus is moved to address bar(URL) and with the next tab key press the focus is moved to the text field("User Id") as expected .

But in IE 8, with the same code, when i press tab the focus moves to address bar and with the next tab key press the focus is moved to compatibility mode icon(if compatibility mode is on) or refresh icon(if compatibility mode is off) and so on. Only at the nineth tab key press the focus is moved to the input field("User Id").

After the URL the focus should move to the input field in IE 8, is this possible..?? If so, pls provide the solution..

Thanks in advance.

Gayathiri kalluru

解决方案

You cannot control that because it is outside the scope of your web page.

But you can make your control to get focus after the body has loaded. See this example: http://www.plus2net.com/html_tutorial/set-focus.php


这篇关于IE 8中的Tab键事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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