本文介绍了更改所需的文本框背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,

我的页面上大约有10到15个文本框,它们都是必需的.谁能告诉我如何更改它们的焦点上的背景色?我可以使用getElementById做到这一点,但我不想获取每个ID.我只想将控件(例如文本框或下拉列表)发送给函数并更改控件的背景色.


如果有人在这方面帮助我,那将非常好.提前谢谢..

谢谢
Yogesh

Hi Friends,

I have around 10 to 15 textboxes on my page and they are all required. Can any one tell me how to change there background color onFocus of them? I can do it by using getElementById, but I don''t want to fetch every single id. I just want to send the control (say textbox or dropdownlist) to the function and change that controls background color.


It''ll be very great if someone help me on this. Thanks in advance..

Thanks
Yogesh

推荐答案



这篇关于更改所需的文本框背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 20:38