TextBox Color


< script >
function txtBr(Recid)
{
if(Recid==0)document.getElementById ("Text1").style.border ='0px';
if(Recid==1)document.getElementById ("Text1").style.border ='1px';
if(Recid==1)document.getElementById ("Text1").style.borderStyle='solid';
if(Recid==1)document.getElementById ("Text1").style.borderColor ='red';
if(Recid==1)document.getElementById ("Text1").style.backgroundColor='yellow';
if(Recid==1)document.getElementById ("Text1").focus();
}
< /script >
< /head >
< body onload ="txtBr(0);" >
< form id="form1" runat="server" >

< input id="Text1" type="text" runat ="Server" onmousemove ="txtBr(1);" / >


Comments

Author: DoubtTgr18 Jul 2009 Member Level: Silver   Points : 1

hai.,

i wan to change text color of the textbox.
after onfocus typed text must display in black color.

onblur text color 'll be in gray color.

help mi with asp C3 code.

Author: Dotnet Developer-201518 Jul 2009 Member Level: Gold   Points : 1

hi

i am post answer this link

http://www.dotnetspider.com/forum/215321-How-chage-text-color-asp-textbox.aspx



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: