// implementing a trim function for strings in javascript
<script language="JavaScript" type="text/javascript">
<!--
String.prototype.trim = function () {
return this.replace(/^\s*/, "").replace(/\s*$/, "");
}
</script>
<asp:TextBox runat="server" ID="abdc" onkeyup ="OnChange(this)" onblur="ShowAvailability()" onchange="this.value=this.value.trim()"></asp:TextBox>
<script language="JavaScript" type="text/javascript">
<!--
String.prototype.trim = function () {
return this.replace(/^\s*/, "").replace(/\s*$/, "");
}
</script>
<asp:TextBox runat="server" ID="abdc" onkeyup ="OnChange(this)" onblur="ShowAvailability()" onchange="this.value=this.value.trim()"></asp:TextBox>
No comments:
Post a Comment