<input id="Text1" onblur="Text1.style.backgroundColor ='Red'" type="text" /> <br /> <br /> <input id="Text2" onblur="Text2.style.backgroundColor ='Red'" type="text" /><br /> <br />
Thank you for posting at Dotnetfunda [Administrator]
Mark this as answer, if it is..... With regards Nishithraj Narayanan
function CheckText() { var elem = document.getElementById('<% = this.yourTextbox.ClientID %>'); if(elem) { if(elem.value.length == 0) elem.style.backgroundColor = '#FE2900'; //put color code here } }
this.yourTextbox.Attributes.Add("onblur", "javascript:CheckText();");
www.abhisheksur.com
Login to post response