function fillareaandunit(id) {
var e = document.getElementById("" + id + "");
var regexp = /^[0-9]+$/;
if (!regexp.test(e.value)) {
alert("Please enter onyl number.");
e.value = e.value.substring(0, e.value.length - 1);
return false;
}
<asp:TextBox ID="txttotalarea" runat="server"
Width="90px" onKeyUp="fillareaandunit(this.id);">0</asp:TextBox>
No comments:
Post a Comment