Step -1 Add below Css in Head tag of Html.
.input_text
{ border:1px solid #cEcEcE;
padding:4px;
font-size:14px;
color:#000000;
background-color:#ffffff;
}
.input_text:focus, input.input_text_focus
{
border-color:#646464; background-color:#ffffc0;
}
Step-2 Add Below Javascript for Hovr/Out text box
setAspnetTextFocus = function() {
var classBlur = 'input_text';
var classFocus = 'input_text_focus';
var inputElements = document.getElementsByTagName('input');
for (var i = 0; i < inputElements.length; i++) {
inputElements[i].onfocus = function() {
if (this.className == 'input_text') {
this.className += ' ' + classFocus;
} }
inputElements[i].onblur = function() {
this.className = this.className.replace(new RegExp(' ' + classFocus + '\\b'), '');
} } }
if (window.attachEvent) window.attachEvent('onload', setAspnetTextFocus);
Step -3 Add CSS to text box
ID="TextBox1" runat="server" CssClass="input_text"
Wednesday, April 28, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment