单击选项卡时如何更改文本框的边框颜色 [英] How to change bordercolor of textbox when tab is clicked

查看:93
本文介绍了单击选项卡时如何更改文本框的边框颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文本框的onclick事件中使用JavaScript更改了文本框的边框颜色.但是,如果按Tab键,则如何更改..

Im changing textbox border color using javascript in onclick event of textbox. But how to change if tab is pressed..

推荐答案

如果您正在使用ajax工具箱控件的tabcontainer控件,则该类具有用于悬停,pressed以及用于css的其他情况的类...
检查一下:
if you are using tabcontainer control of ajax toolkit controls ,it has classes for hover,pressed and other cases for css ...
check this:
Tabs Css classes 
.ajax__tab_header: A container element that wraps all of the tabs at the top of the TabContainer. Child CSS classes:.ajax__tab_outer.
 .ajax__tab_outer: An outer element of a tab, often used to set the left-side background image of the tab.Child CSS classes: .ajax__tab_inner. 
.ajax__tab_inner: An inner element of a tab, often used to set the right-side image of the tab. Child CSS classes:.ajax__tab_tab.
 .ajax__tab_tab: An element of the tab that contains the text content. Child CSS classes:none.
.ajax__tab_body: A container element that wraps the area where a TabPanel is displayed. Child CSS classes: none.
.ajax__tab_hover . This is applied to a tab when the mouse is hovering over. Child CSS classes:.ajax__tab_outer. 
.ajax__tab_active: This is applied to a tab when it is the currently selected tab. Child CSS classes:.ajax__tab_outer. 




否则,您可以这样做...
例如,您的标签ID是"TabExample"
在您的CSS文件中输入以下内容:




otherwise you can do this ...
for example your tab ID is "TabExample"
in you css file enter this :

#TabExample:activated



这是用于悬停的情况:



and this is for hover case:

#TabExample:hover



希望这能解决您的问题!



hope this solve your problem !


这篇关于单击选项卡时如何更改文本框的边框颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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