<asp:TextBox ID="txtRegSearchPincode" CssClass="textboxostyle" Text="Search By Pin" ToolTip="Search By Pin Code" Width="80px" MaxLength="6" onkeypress="return AllowNumericRegPinCodeOnly(this,event);" runat="server" onblur="WaterMarkSearchPinCode(this, event);" onfocus="WaterMarkSearchPinCode(this, event);"></asp:TextBox>
function WaterMarkSearchPinCode(txtPincodeSearch, event) { var defaultSearchPinCode = "Search By Pin"; // Condition to check textbox length and event type if (txtPincodeSearch.value.length == 0 & event.type == "blur") { //if condition true then setting text color and default text in textbox txtPincodeSearch.value = defaultSearchPinCode; } // Condition to check textbox value and event type if (txtPincodeSearch.value == defaultSearchPinCode & event.type == "focus") { txtPincodeSearch.value = ""; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)