最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to get TabIndex property of currently active control? - Stack Overflow

programmeradmin6浏览0评论

How do I find the TabIndex property of the control who has the active focus at runtime. I am using UlitmateEditor(Text Editor) i.e User Control , so i want focus inside the body of that Editor.

How do I find the TabIndex property of the control who has the active focus at runtime. I am using UlitmateEditor(Text Editor) i.e User Control , so i want focus inside the body of that Editor.

Share Improve this question edited Feb 23, 2011 at 17:32 mehul9595 asked Feb 23, 2011 at 16:46 mehul9595mehul9595 1,9557 gold badges32 silver badges55 bronze badges 0
Add a comment  | 

3 Answers 3

Reset to default 17

You should be able to just do:

alert(document.activeElement.tabIndex);

The should get you the active control and its tab index.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webcontrol.tabindex.aspx

AFAIK asp.net is a technology for serving HTML pages =)
If you want to know tabindex of current element in HTML, then you should use document.activeElement.tabIndex. this seems to be javascript question, though.

发布评论

评论列表(0)

  1. 暂无评论