//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...
-
http://sharepointmagazine.net/articles/creating-documents-with-sharepoint-designer-2010-workflows Issue#1 : The workflow could not cr...
-
I guess Drawing is my first extra curricular activity which i have developed during the school days. Thanks to Bhargavi Teacher[my Drawing T...
-
Once upon a time there was a frog which was born and brought in a small well. For that frog that well was everything, it's world and doe...
No comments:
Post a Comment