$("#htxtEmoney, #htxtPoint").keypress(function(e){
var evt = window.event ? window.event : e; //for compatibility
var keyCode = evt.keyCode ? evt.keyCode : e.which;
if (keyCode == 13 || keyCode == 27 || keyCode == 8) return ; // esc, enter
if (48 <= keyCode && keyCode <= 57)
return true; // number
alert("You can write only Number.");
this.focus();
return false;
}).blur(function(e){
Payments.onChangePoint(this);
});
Here is a code I wrote.
If the user input alphabet, the alert()
occur.
and then the blur()
function also occur.
But I want, If an user input alphabet, the alert()
occur and then the blur()
function doesn't occur at that situation.
I mean the blur()
fuction occur only the user click other control..
sorry about my poor English. thx.