Hi,
This script is used for creating text box which will take only intergers as input.
function checkIt(evt) {
var lblmsg = document.getElementById('lblmainphone');
evt = (evt) ? evt : window.event
var charCode = (evt.which) ? evt.which : evt.keyCode
if (charCode ] 31 && (charCode [ 48 || charCode ] 57)) {
status = "This field accepts numbers only."
lblmsg.innerHTML = "This field accepts numbers only.";
return false
}
status = ""
lblmsg.innerHTML = "";
return true
}
how to call in text box.
[asp:TextBox ID="txtabtHomeMorgTerm" runat="server" CssClass="inputbox" onKeyPress="return checkIt(event)"][/asp:TextBox]
Thanks
HelpOnDeskTeam
No comments:
Post a Comment