Buenas tardes! tal vez este codigo te siva!
    
Código codigo:
Ver original- <html>
 
- </head>
 
- <script type="text/javascript">
 
-   
- function isNumberKey(evt,elem) {
 
-     var charCode = (evt.which) ? evt.which : event.keyCode;
 
-     if (charCode > 31 && (charCode < 44 || charCode > 57 || charCode==45 || charCode==46 || charCode==47)){
 
-         return false;
 
-     }
 
-     else{
 
-         var valor=elem.value;
 
-         var tamanio=elem.value.length
 
-         if (elem.value > 99){
 
-             elem.value=99 + ',9';
 
-             return false;
 
-         }
 
-         if(charCode == 44){
 
-             if(valor.indexOf(',') < 0){
 
-                 if (tamanio > 0 && tamanio < 3){
 
-                  return true;
 
-                 }
 
-                 else {
 
-                     return false;
 
-                 }
 
-             }
 
-             else{
 
-                 return false;
 
-             }
 
-         }
 
-     }
 
- }
 
-   
- </script>
 
- </head>
 
- <body>
 
- <form>
 
- <h1>Valida del 1 al 99,9</h1>
 
- <input type="text" name="numero" id= "numero" onKeypress="return isNumberKey(event,this)" maxlength="4" />
 
- </form>
 
- </body>
 
- </html> 
No esta para nada "pulido", pero capas te sirve de algo.

suerte y saludos
