//OnKeyup
function VD(txt)
{
if (txt.value.split('.').length > 2)
{
txt.value = txt.value.substr(0, txt.value.length-1);
}
}
Note: http://asquare.net/javascript/tests/KeyCode.html
// OnKeyPress
function ValidateDecimal(event) {
var keynum;
if(window.event) // IE
{
keynum = event.keyCode;
if (!((keynum >= 48 && keynum <= 57) || keynum == 46 || keynum == 37 || keynum == 39 || keynum == 8 || keynum == 9)) {
return false; }
}
else if(event.which) // Netscape/Firefox/Opera
{
keynum = event.which;
if (!((keynum >= 48 && keynum <= 57) || keynum == 0 || keynum == 9)) {
return false; }
}
}
Subscribe to:
Post Comments (Atom)
SonarQube with Jenkins Setup using Docker Images
https://funnelgarden.com/sonarqube-jenkins-docker/ https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...
-
Happy New Year. May this year is the year for your dreams, passions, everything you believe, your wishes, your desires, your thoughts, your ...
-
The competitive examination for the Indian Forest Service is conducted by Union Public Service Commission (UPSC). IFS exam is conducted ann...
-
Azure Mobile App Service provides services that allow you to support mobile apps across multiple platforms. It does not provide hosting ser...
No comments:
Post a Comment